Changeset 635 for trunk/kernel/fs/fatfs.c
- Timestamp:
- Jun 26, 2019, 11:42:37 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/fatfs.c
r633 r635 1069 1069 { 1070 1070 kmem_req_t req; 1071 req.type = KMEM_ FATFS_CTX;1072 req. size = sizeof(fatfs_ctx_t);1071 req.type = KMEM_KCM; 1072 req.order = bits_log2( sizeof(fatfs_ctx_t) ); 1073 1073 req.flags = AF_KERNEL | AF_ZERO; 1074 1074 1075 return (fatfs_ctx_t *)kmem_alloc( &req );1075 return kmem_alloc( &req ); 1076 1076 } 1077 1077 … … 1101 1101 // - temporarily the BOOT sector 1102 1102 // - permanently the FS_INFO sector 1103 req.type = KMEM_512_BYTES; 1103 req.type = KMEM_KCM; 1104 req.order = 9; // 512 bytes 1104 1105 req.flags = AF_KERNEL | AF_ZERO; 1105 buffer = (uint8_t *)kmem_alloc( &req ); 1106 buffer_xp = XPTR( local_cxy , buffer ); 1106 buffer = kmem_alloc( &req ); 1107 1107 1108 1108 if( buffer == NULL ) … … 1112 1112 } 1113 1113 1114 buffer_xp = XPTR( local_cxy , buffer ); 1115 1114 1116 // load the BOOT record from device 1115 1117 error = dev_ioc_sync_read( buffer_xp , 0 , 1 ); … … 1242 1244 { 1243 1245 kmem_req_t req; 1244 req.type = KMEM_ FATFS_CTX;1246 req.type = KMEM_KCM; 1245 1247 req.ptr = fatfs_ctx; 1246 1248 kmem_free( &req );
Note: See TracChangeset
for help on using the changeset viewer.