minor bug-fixes for "fs" command
Chuck Lever
cel at monkey.org
Fri Feb 5 05:06:36 CET 1999
i found a couple of minor bugs while slugging away at the bigger problem.
these are all against the 0.21 source tree.
first, "fs wscell" returned the workstation's cellname followed by core
garbage. the fix is to change line 2747 of arlad/messages.c:
old:
return xfs_send_message_wakeup_data(fd, h->header.sequence_num, 0,
cellname, strlen(cellname));
new:
return xfs_send_message_wakeup_data(fd, h->header.sequence_num, 0,
cellname, strlen(cellname)+1);
this is how the viocfilecellname() function already handles passing the
workstation's cellname back to a client application.
second, the "newcell" subcommand causes "fs" command to exit quietly when
an error occurs. the exiting is caused by "return 1;". i rewrote
newcell_cmd to use "return 0;" and to print a reasonable error message.
the only other subcommand of "fs" that uses "return 1;" is "quit."
static int
newcell_cmd (int argc, char **argv)
{
int ret;
argc--;
argv++;
if (argc < 2) {
printf ("newcell: Missing required parameter `-cell'\n");
return 0;
}
ret = fs_newcell (argv[0], argc - 1, argv + 1);
if (ret)
fprintf (stderr, "newcell: %s\n", strerror(ret));
return 0;
}
- Chuck Lever
--
corporate: <chuckl at netscape.com>
personal: <chucklever at netscape.net> or <cel at monkey.org>
More information about the Arla-drinkers
mailing list