Use sgdisk to partition images

This commit is contained in:
2023-01-09 00:21:00 +00:00
parent d80c240abd
commit 436aa461b0
39 changed files with 342 additions and 304 deletions

View File

@@ -478,8 +478,12 @@ cmd_i40(struct shell_ctx *ctx, int argc, char **argv) {
static void
bytes_to_kmgtpe(uint64_t *bytes, const char **kmg) {
lldiv_t d;
*kmg = "B";
lldiv_t d = lldiv(*bytes, 1024);
if (*bytes == 0) {
return;
}
d = lldiv(*bytes, 1024);
if (d.rem != 0) {
return;
}