FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 11-03-2010, 03:30 PM
"Brian C. Lane"
 
Default 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)
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 11-03-2010, 04:13 PM
Chris Lumens
 
Default Support devices larger than 1.5TB (#649095, rspanton AT zepler DOT net).

> Ack. That should last us for a couple years

I sure hope so.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 11-04-2010, 11:47 AM
Martin Sivak
 
Default Support devices larger than 1.5TB (#649095, rspanton AT zepler DOT net).

Isn't there a size_t type for exactly this reason?

--
Martin Sivák
msivak@redhat.com
Red Hat Czech
Anaconda team / Brno, CZ

----- "Chris Lumens" <clumens@redhat.com> wrote:

> > Ack. That should last us for a couple years
>
> I sure hope so.
>
> - Chris
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 11-04-2010, 02:01 PM
Chris Lumens
 
Default Support devices larger than 1.5TB (#649095, rspanton AT zepler DOT net).

> Isn't there a size_t type for exactly this reason?

I'm sure we could use it here, but I'm not overly concerned about using
one versus the other. If it really bugs you, feel free to change it.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 12:05 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org