r57: Fix multi-file option, and fix its documentation
authoryoe <yoe>
Sat, 1 May 2004 07:48:23 +0000 (07:48 +0000)
committeryoe <yoe>
Sat, 1 May 2004 07:48:23 +0000 (07:48 +0000)
nbd-server.1.sgml
nbd-server.c

index 2345e31..0f0678a 100644 (file)
@@ -145,6 +145,15 @@ manpage.1: manpage.sgml
            Linux 2.2 and below), you can use this option to store the
            data in multiple files and export a larger filesystem, if
            needed.</para>
+         <para>
+           To use this option, you must make sure that the exported
+           name contains the string "%d", which will be exchanged by
+           the number of the exported file, starting by one; that the
+           individual files are 1G in size; and that the total size
+           of all files together is specified.</para>
+         <para>
+           Allowing more flexibility for this option is planned for
+           future versions.</para>
        </listitem>
       </varlistentry>
       <varlistentry>
index 6891a1a..1cc19a5 100644 (file)
@@ -739,7 +739,7 @@ int splitexport(void) {
        for (i=0; i<exportsize; i+=hunksize) {
                char exportname3[1024];
                
-               sprintf(exportname3, exportname2, i/hunksize);
+               sprintf(exportname3, exportname2, (int)i/hunksize);
                printf( "Opening %s\n", exportname3 );
                if ((export[i/hunksize] = open(exportname3, (flags & F_READONLY) ? O_RDONLY : O_RDWR)) == -1) {
                        /* Read WRITE ACCESS was requested by media is only read only */