Changeset 97ae192a in rtems
- Timestamp:
- 11/03/11 06:32:42 (12 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 6167a5b
- Parents:
- b009f481
- Location:
- cpukit
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libblock/src/bdbuf.c
rb009f481 r97ae192a 291 291 { 292 292 const char* states[] = 293 { " EM", "FR", "CH", "AC", "AM", "MD", "SY", "TR" };293 { "FR", "EM", "CH", "AC", "AM", "MD", "SY", "TR" }; 294 294 295 295 printf ("bdbuf:users: %15s: [%" PRIu32 " (%s)] %td:%td = %" PRIu32 " %s\n", -
cpukit/libfs/src/rfs/rtems-rfs-file-system.c
rb009f481 r97ae192a 197 197 void* user, 198 198 uint32_t flags, 199 uint32_t max_held_buffers, 199 200 rtems_rfs_file_system** fs) 200 201 { … … 227 228 rtems_chain_initialize_empty (&(*fs)->file_shares); 228 229 229 (*fs)->max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;230 (*fs)->max_held_buffers = max_held_buffers; 230 231 (*fs)->buffers_count = 0; 231 232 (*fs)->release_count = 0; -
cpukit/libfs/src/rfs/rtems-rfs-file-system.h
rb009f481 r97ae192a 385 385 * @param fs The file system data filled in by this call. 386 386 * @param user A pointer to user data. 387 * @param flags The initial set of user flags for the file system. 388 * @param max_held_buffers The maximum number of buffers the RFS holds. 387 389 * @return int The error number (errno). No error if 0. 388 390 */ … … 390 392 void* user, 391 393 uint32_t flags, 394 uint32_t max_held_buffers, 392 395 rtems_rfs_file_system** fs); 393 396 -
cpukit/libfs/src/rfs/rtems-rfs-format.c
rb009f481 r97ae192a 466 466 * External API so returns -1. 467 467 */ 468 rc = rtems_rfs_fs_open (name, NULL, RTEMS_RFS_FS_FORCE_OPEN, &fs); 468 rc = rtems_rfs_fs_open (name, NULL, 469 RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE, 470 0, &fs); 469 471 if (rc < 0) 470 472 { -
cpukit/libfs/src/rfs/rtems-rfs-rtems.c
rb009f481 r97ae192a 107 107 108 108 /* 109 * Is this the end of the pathname we w here given ?109 * Is this the end of the pathname we were given ? 110 110 */ 111 111 if ((*path == '\0') || (pathlen == 0)) … … 138 138 139 139 /* 140 * Eat any separators at start of the path.140 * Eat any separators at the start of the path. 141 141 */ 142 142 stripped = rtems_filesystem_prefix_separators (path, pathlen); … … 147 147 /* 148 148 * If the node is the current directory and there is more path to come move 149 * on it else we are at the inode we want.149 * on to it otherwise we are at the inode we want. 150 150 */ 151 151 if (rtems_rfs_current_dir (node)) … … 167 167 { 168 168 /* 169 * If we are at root inode of the file system we have a crossmount path. 169 * If we are at the root inode of the file system we have a crossmount 170 * path. 170 171 */ 171 172 if (ino == RTEMS_RFS_ROOT_INO) … … 184 185 * We need to find the parent of this node. 185 186 */ 186 rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff); 187 rc = rtems_rfs_dir_lookup_ino (fs, &inode, 188 RTEMS_RFS_PARENT_DIR_STR, 189 RTEMS_RFS_PARENT_DIR_SIZE, &ino, &doff); 187 190 if (rc > 0) 188 191 { … … 309 312 310 313 /* 311 * Is this the end of the pathname we w here given ?314 * Is this the end of the pathname we were given ? 312 315 */ 313 316 if (path == *name) … … 336 339 /* 337 340 * If the node is the current directory and there is more path to come move 338 * on it else we are at the inode we want.341 * on to it otherwise we are at the inode we want. 339 342 */ 340 343 if (rtems_rfs_current_dir (node)) … … 385 388 * We need to find the parent of this node. 386 389 */ 387 rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff); 390 rc = rtems_rfs_dir_lookup_ino (fs, &inode, 391 RTEMS_RFS_PARENT_DIR_STR, 392 RTEMS_RFS_PARENT_DIR_SIZE, &ino, &doff); 388 393 if (rc > 0) 389 394 { … … 1225 1230 rtems_rfs_rtems_private* rtems; 1226 1231 rtems_rfs_file_system* fs; 1232 uint32_t flags = 0; 1233 uint32_t max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS; 1234 const char* options = data; 1227 1235 int rc; 1228 1236 1237 /* 1238 * Parse the options the user specifiies. 1239 */ 1240 while (options) 1241 { 1242 printf ("options=%s\n", options); 1243 if (strncmp (options, "hold-bitmaps", 1244 sizeof ("hold-bitmaps") - 1) == 0) 1245 flags |= RTEMS_RFS_FS_BITMAPS_HOLD; 1246 else if (strncmp (options, "no-local-cache", 1247 sizeof ("no-local-cache") - 1) == 0) 1248 flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE; 1249 else if (strncmp (options, "max-held-bufs", 1250 sizeof ("max-held-bufs") - 1) == 0) 1251 { 1252 max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0); 1253 } 1254 else 1255 return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL); 1256 1257 options = strchr (options, ','); 1258 if (options) 1259 { 1260 ++options; 1261 if (*options == '\0') 1262 options = NULL; 1263 } 1264 } 1265 1229 1266 rtems = malloc (sizeof (rtems_rfs_rtems_private)); 1230 1267 if (!rtems) … … 1248 1285 } 1249 1286 1250 rc = rtems_rfs_fs_open (mt_entry->dev, rtems, 0, &fs);1287 rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs); 1251 1288 if (rc) 1252 1289 {
Note: See TracChangeset
for help on using the changeset viewer.