[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] Support devices larger than 1.5TB (#649095, rspanton AT zepler DOT net).



On Wed, Nov 03, 2010 at 11:39:02AM -0400, Chris Lumens wrote:
> ---
>  pyanaconda/isys/devices.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/pyanaconda/isys/devices.c b/pyanaconda/isys/devices.c
> index a30f006..869614e 100644
> --- a/pyanaconda/isys/devices.c
> +++ b/pyanaconda/isys/devices.c
> @@ -90,7 +90,7 @@ struct device **getDevices(enum deviceType type) {
>                  continue;
>  
>              if (devtype == DEVICE_DISK && !(caps & GENHD_FL_REMOVABLE)) {
> -                int size;
> +                long long int size;
>  
>                  snprintf(path, 64, "/sys/block/%s/size", ent->d_name);
>                  fd = open(path, O_RDONLY);
> @@ -104,10 +104,10 @@ struct device **getDevices(enum deviceType type) {
>  
>                  close(fd);
>                  errno = 0;
> -                size = strtol(buf, NULL, 10);
> +                size = strtoll(buf, NULL, 10);
>  
> -                if ((errno == ERANGE && (size == LONG_MIN ||
> -                                         size == LONG_MAX)) ||
> +                if ((errno == ERANGE && (size == LLONG_MIN ||
> +                                         size == LLONG_MAX)) ||
>                      (errno != 0 && size == 0)) {
>                      return NULL;
>                  }

Ack. That should last us for a couple years ;)

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)

Attachment: pgpiDQQFZPYFL.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]