Changeset 116cb91 in mainline
- Timestamp:
- 2012-02-14T21:33:55Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- acb866ae
- Parents:
- dd22cc4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkexfat/mkexfat.c
rdd22cc4 r116cb91 42 42 #define NAME "mkexfat" 43 43 44 static void usage(void) 45 { 46 printf("Usage: mkexfat <device>\n"); 47 } 48 44 49 int main (int argc, char **argv) 45 50 { 51 aoff64_t dev_nblocks; 52 char *dev_path; 53 service_id_t service_id; 54 size_t sector_size; 55 int rc; 56 57 if (argc < 2) { 58 printf(NAME ": Error, argument missing\n"); 59 usage(); 60 return 1; 61 } 62 63 /* TODO: Add parameters */ 64 65 ++argv; 66 dev_path = *argv; 67 68 printf(NAME ": Device = %s\n", dev_path); 69 70 rc = loc_service_get_id(dev_path, &service_id, 0); 71 if (rc != EOK) { 72 printf(NAME ": Error resolving device `%s'.\n"); 73 return 2; 74 } 75 76 rc = block_init(EXCHANGE_SERIALIZE, service_id, 2048); 77 if (rc != EOK) { 78 printf(NAME ": Error initializing libblock.\n"); 79 return 2; 80 } 81 82 rc = block_get_bsize(service_id, §or_size); 83 if (rc != EOK) { 84 printf(NAME ": Error determining device block size.\n"); 85 return 2; 86 } 87 88 46 89 return 0; 47 90 }
Note:
See TracChangeset
for help on using the changeset viewer.