Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   Support devices larger than 1.5TB (#649095, rspanton AT zepler DOT net). (http://www.linux-archive.org/centos/447591-support-devices-larger-than-1-5tb-649095-rspanton-zepler-dot-net.html)

Chris Lumens 11-03-2010 02:39 PM

Support devices larger than 1.5TB (#649095, rspanton AT zepler DOT net).
 
---
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;
}
--
1.7.1.1

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


All times are GMT. The time now is 10:14 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.