- Timestamp:
- 2011-03-13T11:39:00Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5e3eea10
- Parents:
- f8c60f5 (diff), c1a5d8d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace
- Files:
-
- 7 edited
-
app/bdsh/cmds/modules/mkfile/mkfile.c (modified) (1 diff)
-
app/bdsh/cmds/modules/mount/mount.c (modified) (3 diffs)
-
lib/block/libblock.c (modified) (2 diffs)
-
lib/c/generic/loader.c (modified) (1 diff)
-
lib/c/generic/vfs/vfs.c (modified) (3 diffs)
-
srv/devmap/devmap.c (modified) (2 diffs)
-
srv/fs/fat/fat_ops.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/mkfile/mkfile.c
rf8c60f5 rc3f95d8 125 125 126 126 for (c = 0, optind = 0, opt_ind = 0; c != -1;) { 127 c = getopt_long(argc, argv, " pvhVfm:", long_options, &opt_ind);127 c = getopt_long(argc, argv, "s:h", long_options, &opt_ind); 128 128 switch (c) { 129 129 case 'h': -
uspace/app/bdsh/cmds/modules/mount/mount.c
rf8c60f5 rc3f95d8 31 31 #include <vfs/vfs.h> 32 32 #include <errno.h> 33 #include <getopt.h> 33 34 #include "config.h" 34 35 #include "util.h" … … 40 41 static const char *cmdname = "mount"; 41 42 42 /* Dispays help for mount in various levels */ 43 static struct option const long_options[] = { 44 { "help", no_argument, 0, 'h' }, 45 { 0, 0, 0, 0 } 46 }; 47 48 49 /* Displays help for mount in various levels */ 43 50 void help_cmd_mount(unsigned int level) 44 51 { … … 60 67 const char *mopts = ""; 61 68 const char *dev = ""; 62 int rc ;69 int rc, c, opt_ind; 63 70 64 71 argc = cli_count_args(argv); 65 72 73 for (c = 0, optind = 0, opt_ind = 0; c != -1;) { 74 c = getopt_long(argc, argv, "h", long_options, &opt_ind); 75 switch (c) { 76 case 'h': 77 help_cmd_mount(HELP_LONG); 78 return CMD_SUCCESS; 79 } 80 } 81 66 82 if ((argc < 3) || (argc > 5)) { 67 printf("%s: invalid number of arguments. \n",83 printf("%s: invalid number of arguments. Try `mount --help'\n", 68 84 cmdname); 69 85 return CMD_FAILURE; -
uspace/lib/block/libblock.c
rf8c60f5 rc3f95d8 412 412 l = hash_table_find(&cache->block_hash, &key); 413 413 if (l) { 414 found: 414 415 /* 415 416 * We found the block in the cache. … … 494 495 fibril_mutex_unlock(&b->lock); 495 496 goto retry; 497 } 498 l = hash_table_find(&cache->block_hash, &key); 499 if (l) { 500 /* 501 * Someone else must have already 502 * instantiated the block while we were 503 * not holding the cache lock. 504 * Leave the recycled block on the 505 * freelist and continue as if we 506 * found the block of interest during 507 * the first try. 508 */ 509 fibril_mutex_unlock(&b->lock); 510 goto found; 496 511 } 497 512 -
uspace/lib/c/generic/loader.c
rf8c60f5 rc3f95d8 160 160 int rc = async_data_write_start(ldr->phone_id, (void *) pa, pa_len); 161 161 if (rc != EOK) { 162 free(pa); 162 163 async_wait_for(req, NULL); 163 164 return rc; -
uspace/lib/c/generic/vfs/vfs.c
rf8c60f5 rc3f95d8 69 69 char *ncwd_path; 70 70 char *ncwd_path_nc; 71 size_t total_size; 71 72 72 73 fibril_mutex_lock(&cwd_mutex); … … 77 78 return NULL; 78 79 } 79 ncwd_path_nc = malloc(cwd_size + 1 + size + 1); 80 total_size = cwd_size + 1 + size + 1; 81 ncwd_path_nc = malloc(total_size); 80 82 if (!ncwd_path_nc) { 81 83 fibril_mutex_unlock(&cwd_mutex); 82 84 return NULL; 83 85 } 84 str_cpy(ncwd_path_nc, cwd_size + 1 + size + 1, cwd_path);86 str_cpy(ncwd_path_nc, total_size, cwd_path); 85 87 ncwd_path_nc[cwd_size] = '/'; 86 88 ncwd_path_nc[cwd_size + 1] = '\0'; 87 89 } else { 88 ncwd_path_nc = malloc(size + 1); 90 total_size = size + 1; 91 ncwd_path_nc = malloc(total_size); 89 92 if (!ncwd_path_nc) { 90 93 fibril_mutex_unlock(&cwd_mutex); … … 93 96 ncwd_path_nc[0] = '\0'; 94 97 } 95 str_append(ncwd_path_nc, cwd_size + 1 + size + 1, path);98 str_append(ncwd_path_nc, total_size, path); 96 99 ncwd_path = canonify(ncwd_path_nc, retlen); 97 100 if (!ncwd_path) { -
uspace/srv/devmap/devmap.c
rf8c60f5 rc3f95d8 123 123 static devmap_handle_t last_handle = 0; 124 124 static devmap_device_t *null_devices[NULL_DEVICES]; 125 126 /* 127 * Dummy list for null devices. This is necessary so that null devices can 128 * be used just as any other devices, e.g. in devmap_device_unregister_core(). 129 */ 130 static LIST_INITIALIZE(dummy_null_driver_devices); 125 131 126 132 static devmap_handle_t devmap_create_handle(void) … … 953 959 device->name = dev_name; 954 960 955 /* Insert device into list of all devices 956 and into null devices array */ 961 /* 962 * Insert device into list of all devices and into null devices array. 963 * Insert device into a dummy list of null driver's devices so that it 964 * can be safely removed later. 965 */ 957 966 list_append(&device->devices, &devices_list); 967 list_append(&device->driver_devices, &dummy_null_driver_devices); 958 968 null_devices[i] = device; 959 969 -
uspace/srv/fs/fat/fat_ops.c
rf8c60f5 rc3f95d8 325 325 uint16_t_le2host(d->firstc)); 326 326 if (rc != EOK) { 327 (void) block_put(b); 327 328 (void) fat_node_put(FS_NODE(nodep)); 328 329 return rc; … … 811 812 fibril_mutex_unlock(&childp->idx->lock); 812 813 childp->lnkcnt = 0; 814 childp->refcnt++; /* keep the node in memory until destroyed */ 813 815 childp->dirty = true; 814 816 fibril_mutex_unlock(&childp->lock); … … 1488 1490 fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request); 1489 1491 fs_node_t *fn; 1492 fat_node_t *nodep; 1490 1493 int rc; 1491 1494 … … 1499 1502 return; 1500 1503 } 1504 1505 nodep = FAT_NODE(fn); 1506 /* 1507 * We should have exactly two references. One for the above 1508 * call to fat_node_get() and one from fat_unlink(). 1509 */ 1510 assert(nodep->refcnt == 2); 1501 1511 1502 1512 rc = fat_destroy_node(fn);
Note:
See TracChangeset
for help on using the changeset viewer.
