slist
This commit is contained in:
24
slist.c
24
slist.c
@@ -41,10 +41,6 @@ static unsigned long node_to_number(uint8 *addr)
|
||||
|
||||
static void print_net_node_status(uint8 *addr, int is_default)
|
||||
{
|
||||
/*
|
||||
* Novell SLIST prints the node address as a right-aligned decimal
|
||||
* number in a 12 character bracketed field.
|
||||
*/
|
||||
fprintf(stdout, "[%08lX][%12lu]%s",
|
||||
(unsigned long)GET_BE32(addr),
|
||||
node_to_number(addr),
|
||||
@@ -81,14 +77,14 @@ int func_slist(int argc, char *argv[], int mode)
|
||||
upstr(pattern);
|
||||
|
||||
/*
|
||||
* These two format strings are copied from the official Novell SLIST.EXE
|
||||
* string table:
|
||||
*
|
||||
* "Known NetWare File Servers Network Node Address Status\n"
|
||||
* "-------------------------- ------- ------------ ------\n"
|
||||
* Novell-like layout from the DOS client:
|
||||
* Known NetWare File Servers Network Node Address Status
|
||||
* ------------------------- -------- -------------------
|
||||
*/
|
||||
fprintf(stdout, "Known NetWare File Servers Network Node Address Status\n");
|
||||
fprintf(stdout, "-------------------------- ------- ------------ ------\n");
|
||||
fprintf(stdout, "%-44sNetwork Node Address Status\n",
|
||||
"Known NetWare File Servers");
|
||||
fprintf(stdout, "%-44s-------- -------------------\n",
|
||||
"-------------------------");
|
||||
|
||||
while ((result = ncp_17_37(last_id, NCP_BINDERY_FSERVER,
|
||||
pattern, &obj)) == 0) {
|
||||
@@ -97,11 +93,7 @@ int func_slist(int argc, char *argv[], int mode)
|
||||
found++;
|
||||
last_id = obj.object_id;
|
||||
|
||||
/*
|
||||
* The official header puts the Network column at column 53, so the
|
||||
* server name field is 52 characters wide.
|
||||
*/
|
||||
fprintf(stdout, "%-52s", obj.object_name);
|
||||
fprintf(stdout, "%-44s", obj.object_name);
|
||||
|
||||
if (!ncp_17_3d(NCP_BINDERY_FSERVER, obj.object_name,
|
||||
1, "NET_ADDRESS", &prop)) {
|
||||
|
||||
Reference in New Issue
Block a user