diff options
-rw-r--r-- | partx/addpart.c | 6 | ||||
-rw-r--r-- | partx/delpart.c | 2 | ||||
-rw-r--r-- | partx/partx.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/partx/addpart.c b/partx/addpart.c index cd7e28ed7..0d814bf3e 100644 --- a/partx/addpart.c +++ b/partx/addpart.c @@ -52,9 +52,9 @@ int main(int argc, char **argv) err(EXIT_FAILURE, _("%s: open failed"), argv[1]); if (partx_add_partition(fd, - strtol_or_err(argv[2], _("failed to parse partition number")), - strtoll_or_err(argv[3],_("failed to parse start")), - strtoll_or_err(argv[4],_("failed to parse length")))) + strtou32_or_err(argv[2], _("invalid partition number argument")), + strtou64_or_err(argv[3], _("invalid start argument")), + strtou64_or_err(argv[4], _("invalid length argument")))) err(EXIT_FAILURE, _("failed to add partition")); return EXIT_SUCCESS; diff --git a/partx/delpart.c b/partx/delpart.c index eb5d99e99..79925db89 100644 --- a/partx/delpart.c +++ b/partx/delpart.c @@ -53,7 +53,7 @@ int main(int argc, char **argv) err(EXIT_FAILURE, _("%s: open failed"), argv[1]); if (partx_del_partition(fd, - strtol_or_err(argv[2], _("failed to parse partition number")))) + strtou32_or_err(argv[2], _("invalid partition number argument")))) err(EXIT_FAILURE, _("failed to remove partition")); return EXIT_SUCCESS; diff --git a/partx/partx.h b/partx/partx.h index b40fa8fbd..ed0fd0aa4 100644 --- a/partx/partx.h +++ b/partx/partx.h @@ -4,7 +4,7 @@ #include <sys/ioctl.h> #include <linux/blkpg.h> -static inline int partx_del_partition(int fd, int partno) +static inline int partx_del_partition(int fd, unsigned int partno) { struct blkpg_ioctl_arg a; struct blkpg_partition p; @@ -23,7 +23,7 @@ static inline int partx_del_partition(int fd, int partno) } static inline int partx_add_partition(int fd, int partno, - unsigned long start, unsigned long size) + uint64_t start, uint64_t size) { struct blkpg_ioctl_arg a; struct blkpg_partition p; |