Subversion Repositories HelenOS

Rev

Rev 2843 | Rev 2845 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2843 Rev 2844
Line 235... Line 235...
235
    }
235
    }
236
   
236
   
237
found:
237
found:
238
    if (!(d->attr & (FAT_ATTR_SUBDIR | FAT_ATTR_VOLLABEL)))
238
    if (!(d->attr & (FAT_ATTR_SUBDIR | FAT_ATTR_VOLLABEL)))
239
        node->type = FAT_FILE;
239
        node->type = FAT_FILE;
240
    if ((d->attr & FAT_ATTR_SUBDIR) || !pindex)
240
    if ((d->attr & FAT_ATTR_SUBDIR) || !index)
241
        node->type = FAT_DIRECTORY;
241
        node->type = FAT_DIRECTORY;
242
    assert((node->type == FAT_FILE) || (node->type == FAT_DIRECTORY));
242
    assert((node->type == FAT_FILE) || (node->type == FAT_DIRECTORY));
243
   
243
   
244
    node->size = uint32_t_le2host(d->size);
244
    node->size = uint32_t_le2host(d->size);
245
    block_put(b);
245
    block_put(b);
Line 330... Line 330...
330
static unsigned fat_lnkcnt_get(void *node)
330
static unsigned fat_lnkcnt_get(void *node)
331
{
331
{
332
    return ((fat_node_t *)node)->lnkcnt;
332
    return ((fat_node_t *)node)->lnkcnt;
333
}
333
}
334
 
334
 
-
 
335
static void *fat_root_get(dev_handle_t dev_handle)
-
 
336
{
-
 
337
    return fat_node_get(dev_handle, 0, 0); 
-
 
338
}
-
 
339
 
-
 
340
static char fat_plb_get_char(unsigned pos)
-
 
341
{
-
 
342
    return fat_reg.plb_ro[pos % PLB_SIZE];
-
 
343
}
-
 
344
 
335
static bool fat_is_directory(void *node)
345
static bool fat_is_directory(void *node)
336
{
346
{
337
    return ((fat_node_t *)node)->type == FAT_DIRECTORY;
347
    return ((fat_node_t *)node)->type == FAT_DIRECTORY;
338
}
348
}
339
 
349
 
Line 352... Line 362...
352
    .unlink = NULL,
362
    .unlink = NULL,
353
    .index_get = fat_index_get,
363
    .index_get = fat_index_get,
354
    .size_get = fat_size_get,
364
    .size_get = fat_size_get,
355
    .lnkcnt_get = fat_lnkcnt_get,
365
    .lnkcnt_get = fat_lnkcnt_get,
356
    .has_children = NULL,
366
    .has_children = NULL,
357
    .root_get = NULL,
367
    .root_get = fat_root_get,
358
    .plb_get_char = NULL,
368
    .plb_get_char = fat_plb_get_char,
359
    .is_directory = fat_is_directory,
369
    .is_directory = fat_is_directory,
360
    .is_file = fat_is_file
370
    .is_file = fat_is_file
361
};
371
};
362
 
372
 
363
void fat_lookup(ipc_callid_t rid, ipc_call_t *request)
373
void fat_lookup(ipc_callid_t rid, ipc_call_t *request)