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

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

 



---
 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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux