Commit 0a556c7a authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Make path mandatory in -sfile

parent 24eb71a3
......@@ -171,7 +171,6 @@ usage(void)
#ifdef HAVE_LIBUMEM
fprintf(stderr, FMT, "", " -s umem");
#endif
fprintf(stderr, FMT, "", " -s file [default: use /tmp]");
fprintf(stderr, FMT, "", " -s file,<dir_or_file>");
fprintf(stderr, FMT, "", " -s file,<dir_or_file>,<size>");
fprintf(stderr, FMT, "",
......
......@@ -108,8 +108,6 @@ smf_initfile(struct smf_sc *sc, const char *size)
/* XXX: force block allocation here or in open ? */
}
static const char default_filename[] = ".";
static void
smf_init(struct stevedore *parent, int ac, char * const *av)
{
......@@ -120,14 +118,15 @@ smf_init(struct stevedore *parent, int ac, char * const *av)
AZ(av[ac]);
fn = default_filename;
fn = NULL;
size = NULL;
page_size = getpagesize();
if (ac > 3)
ARGV_ERR("(-sfile) too many arguments\n");
if (ac > 0 && *av[0] != '\0')
fn = av[0];
if (ac < 1 || *av[0] == '\0')
ARGV_ERR("(-sfile) path is mandatory\n");
fn = av[0];
if (ac > 1 && *av[1] != '\0')
size = av[1];
if (ac > 2 && *av[2] != '\0') {
......
......@@ -112,7 +112,7 @@ OPTIONS
-s [name=]type[,options]
Use the specified storage backend. The storage backends can be one of the following:
* malloc[,size]
* file[,path[,size[,granularity]]]
* file,path[,size[,granularity]]
* persistent,path,size
See Storage Types in the Users Guide for more information
......@@ -177,7 +177,7 @@ malloc is a memory based backend.
file
~~~~
syntax: file[,path[,size[,granularity]]]
syntax: file,path[,size[,granularity]]
The file backend stores data in a file on disk. The file will be accessed using mmap.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment