projects
/
lwext4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ext4: add ext4_cache_flush for explicit cache flush
[lwext4.git]
/
fs_test
/
lwext4_mbr.c
diff --git
a/fs_test/lwext4_mbr.c
b/fs_test/lwext4_mbr.c
index dbf5d8161ab8b9d9373a353167bc43c0607dc2aa..fdb90507aa541af352dc029ad5c77ed2db8db4ab 100644
(file)
--- a/
fs_test/lwext4_mbr.c
+++ b/
fs_test/lwext4_mbr.c
@@
-93,15
+93,7
@@
static bool open_windows(void)
static bool open_filedev(void)
{
static bool open_filedev(void)
{
- if (winpart) {
- if (!open_windows())
- return false;
- } else {
- if (!open_linux())
- return false;
- }
-
- return true;
+ return winpart ? open_windows() : open_linux();
}
static bool parse_opt(int argc, char **argv)
}
static bool parse_opt(int argc, char **argv)
@@
-113,9
+105,10
@@
static bool parse_opt(int argc, char **argv)
{"input", required_argument, 0, 'i'},
{"wpart", no_argument, 0, 'w'},
{"verbose", no_argument, 0, 'v'},
{"input", required_argument, 0, 'i'},
{"wpart", no_argument, 0, 'w'},
{"verbose", no_argument, 0, 'v'},
+ {"version", no_argument, 0, 'x'},
{0, 0, 0, 0}};
{0, 0, 0, 0}};
- while (-1 != (c = getopt_long(argc, argv, "i:wv",
+ while (-1 != (c = getopt_long(argc, argv, "i:wv
x
",
long_options, &option_index))) {
switch (c) {
long_options, &option_index))) {
switch (c) {
@@
-128,6
+121,10
@@
static bool parse_opt(int argc, char **argv)
case 'v':
verbose = true;
break;
case 'v':
verbose = true;
break;
+ case 'x':
+ puts(VERSION);
+ exit(0);
+ break;
default:
printf("%s", usage);
return false;
default:
printf("%s", usage);
return false;
@@
-170,10
+167,10
@@
int main(int argc, char **argv)
continue;
}
continue;
}
- printf("\toffeset: 0x%
llx, %llu
MB\n",
+ printf("\toffeset: 0x%
"PRIx64", %"PRIu64"
MB\n",
bdevs.partitions[i].part_offset,
bdevs.partitions[i].part_offset / (1024 * 1024));
bdevs.partitions[i].part_offset,
bdevs.partitions[i].part_offset / (1024 * 1024));
- printf("\tsize:
0x%llx, %llu
MB\n",
+ printf("\tsize:
0x%"PRIx64", %"PRIu64"
MB\n",
bdevs.partitions[i].part_size,
bdevs.partitions[i].part_size / (1024 * 1024));
}
bdevs.partitions[i].part_size,
bdevs.partitions[i].part_size / (1024 * 1024));
}