Changeset 4979403 in mainline for uspace/srv/fs/mfs/mfs.c


Ignore:
Timestamp:
2011-09-23T15:39:07Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
286286c
Parents:
8895d05
git-author:
Maurizio Lombardi <m.lombardi85@…> (2011-09-23 15:39:07)
git-committer:
Jakub Jermar <jakub@…> (2011-09-23 15:39:07)
Message:

Allow more instances of the same FS to be used.
(Thanks to Maurizio Lombardi.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/mfs/mfs.c

    r8895d05 r4979403  
    3939
    4040#include <ipc/services.h>
     41#include <stdlib.h>
     42#include <str.h>
    4143#include <ns.h>
    4244#include <async.h>
     
    5254        .concurrent_read_write = false,
    5355        .write_retains_size = false,
     56        .instance = 0,
    5457};
    5558
     
    5962
    6063        printf(NAME ": HelenOS Minix file system server\n");
     64
     65        if (argc == 3) {
     66                if (!str_cmp(argv[1], "--instance"))
     67                        mfs_vfs_info.instance = strtol(argv[2], NULL, 10);
     68                else {
     69                        printf(NAME " Unrecognized parameters");
     70                        rc = -1;
     71                        goto err;
     72                }
     73        }
    6174
    6275        async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE,
Note: See TracChangeset for help on using the changeset viewer.