]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-07-01 Pavel Roskin <proski@gnu.org>
authorproski <proski@localhost>
Wed, 1 Jul 2009 23:58:30 +0000 (23:58 +0000)
committerproski <proski@localhost>
Wed, 1 Jul 2009 23:58:30 +0000 (23:58 +0000)
* util/hostdisk.c (open_device): Remove `const' from
`sysctl_size', as sysctlbyname() can change it (in this case it
doesn't actually happen).

ChangeLog
util/hostdisk.c

index 8af6cd441f3223731e28c67461ac11f8dce96e1f..3ea8033a9d17f33b2311c08a397c5aac679bc3a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-07-01  Pavel Roskin  <proski@gnu.org>
 
+       * util/hostdisk.c (open_device): Remove `const' from
+       `sysctl_size', as sysctlbyname() can change it (in this case it
+       doesn't actually happen).
+
        * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
        using signed long int constants.
 
index 40052653ae16f7951097eb6980ec0cf3dd50db19..d84e7f3bff37ca4ad2848f3e8a854dbe930fd8c8 100644 (file)
@@ -344,7 +344,7 @@ open_device (const grub_disk_t disk, grub_disk_addr_t sector, int flags)
 #else /* ! __linux__ */
 #if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
   int sysctl_flags, sysctl_oldflags;
-  const size_t sysctl_size = sizeof (sysctl_flags);
+  size_t sysctl_size = sizeof (sysctl_flags);
 
   if (sysctlbyname ("kern.geom.debugflags", &sysctl_oldflags, &sysctl_size, NULL, 0))
     {