From 73cca3c79358164f2baa93ad75072998fed44cf4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 16 Jan 2001 11:51:00 +0000 Subject: 2001-01-16 Roland McGrath * storeio.c (parse_opt): Set PARAMS->store_params.store_optional. (storeio_fsys): New global variable. (main): Use it. * dev.h: Declare it. * dev.c (dev_open): If DEV->store_name is null, open the underlying node using store_create. --- storeio/dev.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'storeio/dev.c') diff --git a/storeio/dev.c b/storeio/dev.c index ba57f23f..96f60395 100644 --- a/storeio/dev.c +++ b/storeio/dev.c @@ -1,6 +1,6 @@ /* store `device' I/O - Copyright (C) 1995,96,98,99,2000 Free Software Foundation, Inc. + Copyright (C) 1995,96,98,99,2000,2001 Free Software Foundation, Inc. Written by Miles Bader This program is free software; you can redistribute it and/or @@ -140,9 +140,20 @@ dev_open (struct dev *dev) assert (dev->store == 0); - err = store_parsed_open (dev->store_name, - dev->readonly ? STORE_READONLY : 0, - &dev->store); + if (dev->store_name == 0) + { + /* This means we had no store arguments. + We are to operate on our underlying node. */ + err = store_create (storeio_fsys->underlying, + dev->readonly ? STORE_READONLY : 0, + &dev->store); + + } + else + /* Open based on the previously parsed store arguments. */ + err = store_parsed_open (dev->store_name, + dev->readonly ? STORE_READONLY : 0, + &dev->store); if (err) return err; -- cgit v1.2.3