forked from pool/parted
- re-add missing hunk to fix bsc#1164907 parted-type-accept-hex.patch type on the cmdline could be specified in hex as 0x82 OBS-URL: https://build.opensuse.org/request/show/829592 OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=146
16 lines
444 B
Diff
16 lines
444 B
Diff
--- parted-3.3/parted/ui.c 2020/08/25 16:28:53 1.1
|
|
+++ parted-3.3/parted/ui.c 2020/08/25 16:31:39
|
|
@@ -926,7 +926,11 @@
|
|
return 0;
|
|
|
|
errno = 0;
|
|
- ret = strtol (input, (char**) NULL, 10);
|
|
+
|
|
+ if (strstr(input, "0x") == input)
|
|
+ ret = strtol (input, (char**) NULL, 16);
|
|
+ else
|
|
+ ret = strtol (input, (char**) NULL, 10);
|
|
if (errno)
|
|
goto error;
|
|
|