1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Cosmetic tweaks.

Also redirect stderr to Debug when running multiuser.
This commit is contained in:
Jordan K. Hubbard 1997-01-29 21:45:30 +00:00
parent 431285ea2b
commit 4c5f552d9a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=22102
9 changed files with 19 additions and 19 deletions

View File

@ -98,7 +98,7 @@ mediaInitFTP(Device *dev)
sprintf(password, "installer@%s", variable_get(VAR_HOSTNAME));
msgNotify("Logging in to %s@%s..", login_name, hostname);
if ((OpenConn = ftpLogin(hostname, login_name, password, FtpPort, isDebug(), &code)) == NULL) {
msgConfirm("Couldn't open FTP connection to %s, errcode = %d", hostname, code);
msgConfirm("Couldn't open FTP connection to %s:\n %s.", hostname, ftpErrString(code));
goto punt;
}
@ -110,7 +110,7 @@ mediaInitFTP(Device *dev)
msgConfirm("No such directory ftp://%s/%s\n"
"please check your URL and try again.", hostname, dir);
else
msgConfirm("FTP chdir to ftp://%s/%s returned error status %d\n", hostname, dir, i);
msgConfirm("FTP chdir to ftp://%s/%s returned error status:\n %s.", hostname, dir, ftpErrString(i));
goto punt;
}
}

View File

@ -430,7 +430,7 @@ pkg_fire(dialogMenuItem *self)
msgInfo("Added %s to selection list", kp->name);
}
}
else if (sp) {
else {
msgInfo("Removed %s from selection list", kp->name);
index_delete(sp);
}

View File

@ -81,10 +81,10 @@ main(int argc, char **argv)
if (OnVTY) {
for (curr = 0; curr < 25; curr++)
putchar('\n');
/* Move stderr aside */
if (DebugFD)
dup2(DebugFD, 2);
}
/* Move stderr aside */
if (DebugFD)
dup2(DebugFD, 2);
/* Probe for all relevant devices on the system */
deviceGetAll();

View File

@ -63,8 +63,8 @@ package_exists(char *name)
*/
snprintf(fname, FILENAME_MAX, "/var/db/pkg/%s", name);
status = access(fname, R_OK);
msgDebug("package check for %s returns %s.\n", name,
status ? "failure" : "success");
if (isDebug())
msgDebug("package check for %s returns %s.\n", name, status ? "failure" : "success");
return !status;
}

View File

@ -81,10 +81,10 @@ main(int argc, char **argv)
if (OnVTY) {
for (curr = 0; curr < 25; curr++)
putchar('\n');
/* Move stderr aside */
if (DebugFD)
dup2(DebugFD, 2);
}
/* Move stderr aside */
if (DebugFD)
dup2(DebugFD, 2);
/* Probe for all relevant devices on the system */
deviceGetAll();

View File

@ -98,7 +98,7 @@ mediaInitFTP(Device *dev)
sprintf(password, "installer@%s", variable_get(VAR_HOSTNAME));
msgNotify("Logging in to %s@%s..", login_name, hostname);
if ((OpenConn = ftpLogin(hostname, login_name, password, FtpPort, isDebug(), &code)) == NULL) {
msgConfirm("Couldn't open FTP connection to %s, errcode = %d", hostname, code);
msgConfirm("Couldn't open FTP connection to %s:\n %s.", hostname, ftpErrString(code));
goto punt;
}
@ -110,7 +110,7 @@ mediaInitFTP(Device *dev)
msgConfirm("No such directory ftp://%s/%s\n"
"please check your URL and try again.", hostname, dir);
else
msgConfirm("FTP chdir to ftp://%s/%s returned error status %d\n", hostname, dir, i);
msgConfirm("FTP chdir to ftp://%s/%s returned error status:\n %s.", hostname, dir, ftpErrString(i));
goto punt;
}
}

View File

@ -430,7 +430,7 @@ pkg_fire(dialogMenuItem *self)
msgInfo("Added %s to selection list", kp->name);
}
}
else if (sp) {
else {
msgInfo("Removed %s from selection list", kp->name);
index_delete(sp);
}

View File

@ -81,10 +81,10 @@ main(int argc, char **argv)
if (OnVTY) {
for (curr = 0; curr < 25; curr++)
putchar('\n');
/* Move stderr aside */
if (DebugFD)
dup2(DebugFD, 2);
}
/* Move stderr aside */
if (DebugFD)
dup2(DebugFD, 2);
/* Probe for all relevant devices on the system */
deviceGetAll();

View File

@ -63,8 +63,8 @@ package_exists(char *name)
*/
snprintf(fname, FILENAME_MAX, "/var/db/pkg/%s", name);
status = access(fname, R_OK);
msgDebug("package check for %s returns %s.\n", name,
status ? "failure" : "success");
if (isDebug())
msgDebug("package check for %s returns %s.\n", name, status ? "failure" : "success");
return !status;
}