Files
ncpfs/util/fsinfo.c
ncpfs archive import 20589ca203 Import ncpfs 0.11
2026-04-28 20:39:57 +02:00

47 lines
660 B
C

/*
* fsinfo.c
*
* Print the info strings of a server, maybe sometime more.
*
* Copyright (C) 1996 by Volker Lendecke
*
*/
#include <stdio.h>
#include "ncplib.h"
int
main(int argc, char **argv)
{
struct ncp_conn conn;
char strings[512];
char *s;
if (ncp_initialize(&conn, &argc, argv, 0) != 0)
{
perror("Could not open connection");
return 1;
}
if (ncp_get_file_server_description_strings(&conn, strings) != 0)
{
perror("could not get strings");
ncp_close(&conn);
return 1;
}
s = strings;
while (s < strings+512)
{
if (strlen(s) == 0)
{
break;
}
puts(s);
s += strlen(s)+1;
}
ncp_close(&conn);
return 0;
}