/[hurd]/hurd/storeio/dev.c
ViewVC logotype

Diff of /hurd/storeio/dev.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by marcus, Sun May 6 13:18:29 2001 UTC revision 1.17 by roland, Wed Jan 2 01:32:36 2002 UTC
# Line 137  error_t Line 137  error_t
137  dev_open (struct dev *dev)  dev_open (struct dev *dev)
138  {  {
139    error_t err;    error_t err;
140      const int flags = ((dev->readonly ? STORE_READONLY : 0)
141                         | (dev->no_fileio ? STORE_NO_FILEIO : 0));
142    
143    assert (dev->store == 0);    assert (dev->store == 0);
144    
# Line 144  dev_open (struct dev *dev) Line 146  dev_open (struct dev *dev)
146      {      {
147        /* This means we had no store arguments.        /* This means we had no store arguments.
148           We are to operate on our underlying node. */           We are to operate on our underlying node. */
149        err = store_create (storeio_fsys->underlying,        err = store_create (storeio_fsys->underlying, flags, 0, &dev->store);
                           dev->readonly ? STORE_READONLY : 0,  
                           0, &dev->store);  
150      }      }
151    else    else
152      /* Open based on the previously parsed store arguments.  */      /* Open based on the previously parsed store arguments.  */
153      err = store_parsed_open (dev->store_name,      err = store_parsed_open (dev->store_name, flags, &dev->store);
                              dev->readonly ? STORE_READONLY : 0,  
                              &dev->store);  
154    if (err)    if (err)
155      return err;      return err;
156    
157    /* Inactivate the store, it will be activated at first access.    /* Inactivate the store, it will be activated at first access.
158       We ignore possible EINVAL here.  XXX Pass STORE_INACTIVE to       We ignore possible EINVAL here   .  XXX Pass STORE_INACTIVE to
159       store_create/store_parsed_open instead when libstore is fixed       store_create/store_parsed_open instead when libstore is fixed
160       to support this.  */       to support this.  */
161    store_set_flags (dev->store, STORE_INACTIVE);    store_set_flags (dev->store, STORE_INACTIVE);

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26