diff --git a/libtest/Makefile.in b/libtest/Makefile.in index b398b152411..92ea073040c 100644 --- a/libtest/Makefile.in +++ b/libtest/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = none RCFLAGS = -w32 -h -PROGRAMS = expand hello hello2 hello3 hello4 hello5 new rolex +PROGRAMS = expand hello hello2 hello3 hello4 hello5 new rolex volinfo ALL_LIBS = $(WINELIB) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS) C_SRCS = \ @@ -15,7 +15,8 @@ C_SRCS = \ hello4.c \ hello5.c \ new.c \ - rolex.c + rolex.c \ + volinfo.c RC_SRCS = \ hello3res.rc @@ -52,4 +53,7 @@ new: new.o rolex: rolex.o $(CC) -o rolex rolex.o $(LDOPTIONS) $(ALL_LIBS) +volinfo: volinfo.o + $(CC) -o volinfo volinfo.o $(LDOPTIONS) $(ALL_LIBS) + ### Dependencies: diff --git a/libtest/volinfo.c b/libtest/volinfo.c new file mode 100644 index 00000000000..65baf130551 --- /dev/null +++ b/libtest/volinfo.c @@ -0,0 +1,28 @@ +/* + * This test program was copied from documentation/cdrom-label + */ +#include +#include +#include /* for strcat() */ + +int WinMain(int argc,char **argv[]) +{ + char drive, root[]="C:\\", label[1002], fsname[1002]; + DWORD serial, flags, filenamelen, labellen = 1000, fsnamelen = 1000; + + printf("Drive Serial Flags Filename-Length " + "Label Fsname\n"); + for (drive = 'C'; drive <= 'Z'; drive++) + { + root[0] = drive; + if (GetVolumeInformation(root,label,labellen,&serial, + &filenamelen,&flags,fsname,fsnamelen)) + { + strcat(label,"\""); strcat (fsname,"\""); + printf("%c:\\ 0x%08lx 0x%08lx %15ld \"%-20s \"%-20s\n", + drive, (long) serial, (long) flags, (long) filenamelen, + label, fsname); + } + } + return 0; +}