Changeset 210e50a in mainline for uspace/app/init/init.c


Ignore:
Timestamp:
2010-02-03T13:36:46Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
28be7fa
Parents:
82474ef
Message:

understand an empty fqdn as the device argument to mount() as an implicit request to create a fresh null/%d device

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/init/init.c

    r82474ef r210e50a  
    9494static bool mount_devfs(void)
    9595{
    96         char null[MAX_DEVICE_NAME];
    97         int null_id = devmap_null_create();
    98        
    99         if (null_id == -1) {
    100                 printf(NAME ": Unable to create null device\n");
    101                 return false;
    102         }
    103        
    104         snprintf(null, MAX_DEVICE_NAME, "null/%d", null_id);
    105         int rc = mount("devfs", DEVFS_MOUNT_POINT, null, "", IPC_FLAG_BLOCKING);
     96        int rc = mount("devfs", DEVFS_MOUNT_POINT, "", "", IPC_FLAG_BLOCKING);
    10697       
    10798        switch (rc) {
     
    111102        case EBUSY:
    112103                printf(NAME ": Device filesystem already mounted\n");
    113                 devmap_null_destroy(null_id);
    114104                return false;
    115105        case ELIMIT:
    116106                printf(NAME ": Unable to mount device filesystem\n");
    117                 devmap_null_destroy(null_id);
    118107                return false;
    119108        case ENOENT:
    120109                printf(NAME ": Unknown filesystem type (devfs)\n");
    121                 devmap_null_destroy(null_id);
    122110                return false;
    123111        default:
    124112                printf(NAME ": Error mounting device filesystem (%d)\n", rc);
    125                 devmap_null_destroy(null_id);
    126113                return false;
    127114        }
Note: See TracChangeset for help on using the changeset viewer.