]> git.proxmox.com Git - grub2.git/commitdiff
2009-12-10 Vladimir Serbinenko <phcoder@gmail.com>
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 10 Dec 2009 13:37:42 +0000 (14:37 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 10 Dec 2009 13:37:42 +0000 (14:37 +0100)
Eliminate hexdump 4Gib barrier.

* commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_addr_t.
* lib/arg.c (grub_arg_parse): Use grub_strtoull.

ChangeLog
commands/hexdump.c
lib/arg.c

index e87ddefe3e01b8b328e1a2e427310a627c01e77f..a1c5d5e8993c634179770855b10f981a98dd8b8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-12-10  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Eliminate hexdump 4Gib barrier.
+
+       * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_addr_t.
+       * lib/arg.c (grub_arg_parse): Use grub_strtoull.
+
 2009-12-10  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * kern/device.c (grub_device_iterate): Ignore errors during first scan.
index f59ba363cc991d6d1c9b09ea104a5cb5d6a5d592..4b3e3ef29ca8ca435d3ff2527eeb171f953dae2d 100644 (file)
@@ -38,18 +38,18 @@ grub_cmd_hexdump (grub_extcmd_t cmd, int argc, char **args)
   struct grub_arg_list *state = cmd->state;
   char buf[GRUB_DISK_SECTOR_SIZE * 4];
   grub_ssize_t size, length;
-  grub_addr_t skip;
+  grub_disk_addr_t skip;
   int namelen;
 
   if (argc != 1)
     return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
 
   namelen = grub_strlen (args[0]);
-  skip = (state[0].set) ? grub_strtoul (state[0].arg, 0, 0) : 0;
+  skip = (state[0].set) ? grub_strtoull (state[0].arg, 0, 0) : 0;
   length = (state[1].set) ? grub_strtoul (state[1].arg, 0, 0) : 256;
 
   if (!grub_strcmp (args[0], "(mem)"))
-    hexdump (skip, (char *) skip, length);
+    hexdump (skip, (char *) (grub_addr_t) skip, length);
   else if ((args[0][0] == '(') && (args[0][namelen - 1] == ')'))
     {
       grub_disk_t disk;
index ed37986b69ae7d384f437960e60e7c68b3bfda4c..24e9d5b1523b025777be58b2c259a7cbb8978a9b 100644 (file)
--- a/lib/arg.c
+++ b/lib/arg.c
@@ -355,7 +355,7 @@ grub_arg_parse (grub_extcmd_t cmd, int argc, char **argv,
              {
                char *tail;
 
-               grub_strtoul (option, &tail, 0);
+               grub_strtoull (option, &tail, 0);
                if (tail == 0 || tail == option || *tail != '\0' || grub_errno)
                  {
                    grub_error (GRUB_ERR_BAD_ARGUMENT,