projects
/
nbd.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eb7d2f9
)
r57: Fix multi-file option, and fix its documentation
author
yoe <yoe>
Sat, 1 May 2004 07:48:23 +0000
(07:48 +0000)
committer
yoe <yoe>
Sat, 1 May 2004 07:48:23 +0000
(07:48 +0000)
nbd-server.1.sgml
patch
|
blob
|
history
nbd-server.c
patch
|
blob
|
history
diff --git
a/nbd-server.1.sgml
b/nbd-server.1.sgml
index
2345e31
..
0f0678a
100644
(file)
--- a/
nbd-server.1.sgml
+++ b/
nbd-server.1.sgml
@@
-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>
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>
</listitem>
</varlistentry>
<varlistentry>
diff --git
a/nbd-server.c
b/nbd-server.c
index
6891a1a
..
1cc19a5
100644
(file)
--- a/
nbd-server.c
+++ b/
nbd-server.c
@@
-739,7
+739,7
@@
int splitexport(void) {
for (i=0; i<exportsize; i+=hunksize) {
char exportname3[1024];
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 */
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 */