Hello community, here is the log from the commit of package linuxrc for openSUSE:Factory checked in at Tue Oct 18 14:22:35 CEST 2011. -------- --- openSUSE:Factory/linuxrc/linuxrc.changes 2011-10-13 12:31:53.000000000 +0200 +++ /mounts/work_src_done/STABLE/linuxrc/linuxrc.changes 2011-10-18 09:49:38.000000000 +0200 @@ -1,0 +2,19 @@ +Tue Oct 18 09:49:00 CEST 2011 - mhrusecky@suse.cz + +- fixing build on arm - same keyboard options as i386 + +------------------------------------------------------------------- +Tue Oct 18 09:42:35 CEST 2011 - snwint@suse.de + +- s390: fix type mixup in LCS activation code (bnc #689374) +- preserve default value when chopping whitespace (bnc #706605) + +------------------------------------------------------------------- +Tue Oct 18 09:38:13 CEST 2011 - snwint@suse.de + +- detect btrfs (bnc #713393) +- use 64 bit memory sizes everywhere (bnc #699886) +- set ipv6 gateway (bnc #706967) +- introduce minimal terminal size to work with strange terminals (bnc #668667) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- linuxrc-3.5.12.tar.bz2 New: ---- linuxrc-3.5.15.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ linuxrc.spec ++++++ --- /var/tmp/diff_new_pack.lYXrDI/_old 2011-10-18 14:22:24.000000000 +0200 +++ /var/tmp/diff_new_pack.lYXrDI/_new 2011-10-18 14:22:24.000000000 +0200 @@ -24,9 +24,9 @@ Group: System/Boot AutoReqProv: on Summary: SUSE Installation Program -Version: 3.5.12 +Version: 3.5.15 Release: 1 -Source: linuxrc-3.5.12.tar.bz2 +Source: linuxrc-3.5.15.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description ++++++ linuxrc-3.5.12.tar.bz2 -> linuxrc-3.5.15.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/VERSION new/linuxrc-3.5.15/VERSION --- old/linuxrc-3.5.12/VERSION 2011-10-13 08:30:30.000000000 +0200 +++ new/linuxrc-3.5.15/VERSION 2011-10-18 09:48:57.000000000 +0200 @@ -1 +1 @@ -3.5.12 +3.5.15 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/changelog new/linuxrc-3.5.15/changelog --- old/linuxrc-3.5.12/changelog 2011-10-13 08:30:32.000000000 +0200 +++ new/linuxrc-3.5.15/changelog 2011-10-18 09:48:59.000000000 +0200 @@ -1,4 +1,18 @@ -2011-09-13: HEAD +2011-10-18: HEAD + - fix arm build + +2011-10-18: 3.5.14 + - s390: fix type mixup in LCS activation code (bnc #689374) + - preserve default value when chopping whitespace (bnc #706605) + +2011-10-18: 3.5.13 + - new year + - detect btrfs (bnc #713393) + - use 64 bit memory sizes everywhere (bnc #699886) + - set ipv6 gateway (bnc #706967) + - introduce minimal terminal size to work with strange terminals (bnc #668667) + +2011-09-13: 3.5.12 - Handle symlinks in /sys/block directory. - print segfault backtrace even without trace option diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/dialog.c new/linuxrc-3.5.15/dialog.c --- old/linuxrc-3.5.12/dialog.c 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/dialog.c 2011-10-18 09:40:58.000000000 +0200 @@ -1731,23 +1731,44 @@ int retval; char* final; /* stripped string */ char* oinput; /* original pointer to input string */ - + + char *deflt = NULL; + if (*input) + deflt = strdup(*input); + retval = dia_input2(txt, input, fieldlen, pw_mode); oinput = *input; - + /* null pointer or empty string */ - if(!*input || !**input) return retval; - + if(!*input || !**input) { + if (deflt) { + /* restore what we had as default */ + if (*input) + free(*input); + *input = deflt; + } + return retval; + } + while(**input && isspace(**input)) /* skip leading whitespace */ (*input)++; while(isspace(*(*input+strlen(*input)-1))) /* overwrite trailing whitespace */ *(*input+strlen(*input)-1) = 0; - - /* copy result and discard original string */ - final = strdup(*input); + + if (!strlen(*input)) { + /* nothing left after stripping whitespace + -> restore previous default */ + *input = deflt; + } + else { + /* copy result and discard original string */ + final = strdup(*input); + *input = final; + if (deflt) + free(deflt); + } free(oinput); - *input = final; - + return retval; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/file.c new/linuxrc-3.5.15/file.c --- old/linuxrc-3.5.12/file.c 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/file.c 2011-10-18 09:38:02.000000000 +0200 @@ -770,18 +770,18 @@ break; case key_memlimit: - if(f->is.numeric) config.memory.min_free = f->nvalue; + if(f->is.numeric) config.memoryXXX.min_free = f->nvalue << 10; break; case key_memyast: - if(f->is.numeric) config.memory.min_yast = f->nvalue; + if(f->is.numeric) config.memoryXXX.min_yast = f->nvalue << 10; break; case key_memloadimage: if(f->is.numeric) { - config.memory.load_image = f->nvalue; + config.memoryXXX.load_image = f->nvalue << 10; if(!config.download.instsys_set) { - config.download.instsys = config.memory.free > config.memory.load_image ? 1 : 0; + config.download.instsys = config.memoryXXX.free > config.memoryXXX.load_image ? 1 : 0; } } break; @@ -1186,7 +1186,7 @@ break; case key_minmem: - if(f->is.numeric) config.memory.ram_min = f->nvalue; + if(f->is.numeric) config.memoryXXX.ram_min = f->nvalue << 10; break; #if defined(__s390__) || defined(__s390x__) @@ -1685,9 +1685,9 @@ } -void file_write_num(FILE *f, file_key_t key, int num) +void file_write_num(FILE *f, file_key_t key, int64_t num) { - fprintf(f, "%s: %d\n", file_key2str(key), num); + fprintf(f, "%s: %lld\n", file_key2str(key), (long long) num); } @@ -1913,7 +1913,7 @@ file_write_num(f, key_yast2update, config.update.ask || config.update.count ? 1 : 0); file_write_num(f, key_textmode, config.textmode); file_write_str(f, key_autoyast, config.autoyast); - file_write_num(f, key_memfree, config.memory.current); + file_write_num(f, key_memfree, config.memoryXXX.current >> 10); // convention: in kB file_write_num(f, key_vnc, config.vnc); file_write_str(f, key_vncpassword, config.net.vncpassword); file_write_inet2(f, key_displayip, &config.net.displayip, INET_WRITE_IP); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/file.h new/linuxrc-3.5.15/file.h --- old/linuxrc-3.5.12/file.h 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/file.h 2011-10-18 09:38:02.000000000 +0200 @@ -86,7 +86,7 @@ void file_free_file(file_t *file); void file_write_str(FILE *f, file_key_t key, char *str); -void file_write_num(FILE *f, file_key_t key, int num); +void file_write_num(FILE *f, file_key_t key, int64_t num); void file_write_sym(FILE *f, file_key_t key, char *base_sym, int num); void file_write_install_inf(char *dir); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/fstype.c new/linuxrc-3.5.15/fstype.c --- old/linuxrc-3.5.12/fstype.c 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/fstype.c 2011-10-18 09:38:02.000000000 +0200 @@ -394,6 +394,17 @@ } if (!type) { + char buf[8]; + if ( + lseek(fd, 0x10040, SEEK_SET) == 0x10040 && + read(fd, buf, sizeof buf) == sizeof buf && + !memcmp(buf, "_BHRfS_M", sizeof buf) + ) { + type = "btrfs"; + } + } + + if (!type) { /* perhaps the user tries to mount the swap space on a new disk; warn her before she does mke2fs on it */ int pagesize = getpagesize(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/global.c new/linuxrc-3.5.15/global.c --- old/linuxrc-3.5.12/global.c 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/global.c 2011-10-18 09:29:37.000000000 +0200 @@ -8,9 +8,6 @@ #include "global.h" -#define X_DEFAULT 80 -#define Y_DEFAULT 25 - int max_x_ig = X_DEFAULT; int max_y_ig = Y_DEFAULT; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/global.h new/linuxrc-3.5.15/global.h --- old/linuxrc-3.5.12/global.h 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/global.h 2011-10-18 09:38:02.000000000 +0200 @@ -55,8 +55,13 @@ /* max bytes needed for utf8 string of length a */ #define UTF8_SIZE(a) ((a) * 6 + 1) +/* terminal sizes */ +#define X_DEFAULT 80 +#define Y_DEFAULT 24 #define MAX_X 250 #define MAX_Y 150 +#define MIN_X 8 +#define MIN_Y 4 #define BUTTON_SIZE_NORMAL 8 #define BUTTON_SIZE_LARGE 10 @@ -478,17 +483,17 @@ slist_t *options; /* potential module parameters */ } module; - struct { - int total; /* memory size (in kB) */ - int free; /* free memory (in kB) when linuxrc starts */ - int free_swap; /* free swap */ - int current; /* currently free memory */ - int min_free; /* don't let it drop below this */ - int min_yast; /* minimum for yast */ - int load_image; /* _load_ rootimage, if we have at least that much */ - int ram; /* ram size in MB */ - int ram_min; /* min required memory (ram size) needed for install in MB */ - } memory; + struct { /* Note: all memory sizes are now in bytes */ + int64_t total; /* memory size */ + int64_t free; /* free memory when linuxrc starts */ + int64_t free_swap; /* free swap */ + int64_t current; /* currently free memory */ + int64_t min_free; /* don't let it drop below this */ + int64_t min_yast; /* minimum for yast */ + int64_t load_image; /* _load_ rootimage, if we have at least that much */ + int64_t ram; /* ram size */ + int64_t ram_min; /* min required memory (ram size) needed for install */ + } memoryXXX; struct { /* mountpoints */ unsigned cnt; /* mp counter */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/install.c new/linuxrc-3.5.15/install.c --- old/linuxrc-3.5.12/install.c 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/install.c 2011-10-18 09:38:02.000000000 +0200 @@ -1133,7 +1133,7 @@ util_free_mem(); if(config.addswap) { i = ask_for_swap( - config.addswap == 2 ? -1 : config.memory.min_yast - config.memory.min_free, + config.addswap == 2 ? -1 : config.memoryXXX.min_yast - config.memoryXXX.min_free, txt_get(TXT_LOW_MEMORY2) ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/keyboard.c new/linuxrc-3.5.15/keyboard.c --- old/linuxrc-3.5.12/keyboard.c 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/keyboard.c 2011-10-18 09:38:02.000000000 +0200 @@ -113,8 +113,8 @@ tcsetattr (config.kbd_fd, TCSAFLUSH, &kbd_tio_rm); if (first) { - max_x_ig = 80; - max_y_ig = 24; + max_x_ig = X_DEFAULT; + max_y_ig = Y_DEFAULT; } return; } @@ -124,7 +124,7 @@ kbd_tio_rm.c_iflag &= ~(INLCR | IGNCR | ICRNL); if (first && !ioctl (config.kbd_fd, TIOCGWINSZ, &winsize_ri)) { - if (winsize_ri.ws_col && winsize_ri.ws_row) + if (winsize_ri.ws_col >= MIN_X && winsize_ri.ws_row >= MIN_Y) { max_x_ig = winsize_ri.ws_col; max_y_ig = winsize_ri.ws_row; @@ -149,6 +149,11 @@ if(max_x_ig > MAX_X) max_x_ig = MAX_X; if(max_y_ig > MAX_Y) max_y_ig = MAX_Y; + if(max_x_ig < MIN_X || max_y_ig < MIN_Y) { + max_x_ig = X_DEFAULT; + max_y_ig = Y_DEFAULT; + } + if(!config.had_segv) fprintf(stderr, "Window size: %d x %d\n", max_x_ig, max_y_ig); memset(&winsize_ri, 0, sizeof winsize_ri); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/linuxrc.c new/linuxrc-3.5.15/linuxrc.c --- old/linuxrc-3.5.12/linuxrc.c 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/linuxrc.c 2011-10-18 09:38:02.000000000 +0200 @@ -204,7 +204,7 @@ // fprintf(stderr, "free: %d, %d\n", config.memory.free, config.tmpfs); - if(config.tmpfs && config.memory.free > 24 * 1024) { + if(config.tmpfs && config.memoryXXX.free > (24 << 20)) { lxrc_movetotmpfs(); /* does not return if successful */ } @@ -779,9 +779,9 @@ config.scsi_before_usb = 1; // default memory limits - config.memory.min_free = 12 * 1024; - config.memory.min_yast = 224 * 1024; - config.memory.load_image = 350 * 1024; + config.memoryXXX.min_free = 12 << 20; + config.memoryXXX.min_yast = 224 << 20; + config.memoryXXX.load_image = 350 << 20; config.swap_file_size = 1024; /* 1024 MB */ @@ -826,7 +826,7 @@ if (config.linemode) putchar('\n'); printf( - "\n>>> %s installation program v" LXRC_FULL_VERSION " (c) 1996-2010 SUSE Linux Products GmbH <<<\n", + "\n>>> %s installation program v" LXRC_FULL_VERSION " (c) 1996-2011 SUSE Linux Products GmbH <<<\n", config.product ); if (config.linemode) @@ -874,12 +874,12 @@ util_free_mem(); - if(config.memory.free < config.memory.min_free) { - config.memory.min_free = config.memory.free; + if(config.memoryXXX.free < config.memoryXXX.min_free) { + config.memoryXXX.min_free = config.memoryXXX.free; } if(!config.download.instsys_set) { - config.download.instsys = config.memory.free > config.memory.load_image ? 1 : 0; + config.download.instsys = config.memoryXXX.free > config.memoryXXX.load_image ? 1 : 0; } lxrc_set_modprobe("/etc/nothing"); @@ -1024,21 +1024,22 @@ } #endif - if(config.memory.ram_min && !config.had_segv) { - int window = config.win, ram; + if(config.memoryXXX.ram_min && !config.had_segv) { + int window = config.win; + int64_t ram; char *msg = NULL; util_get_ram_size(); - ram = config.memory.ram_min - config.memory.ram_min / 8; + ram = config.memoryXXX.ram_min - config.memoryXXX.ram_min / 8; - if(config.memory.ram < ram) { + if(config.memoryXXX.ram < ram) { if(!window) util_disp_init(); - strprintf(&msg, txt_get(TXT_NO_RAM), config.product, config.memory.ram_min); + strprintf(&msg, txt_get(TXT_NO_RAM), config.product, (int) (config.memoryXXX.ram_min >> 20)); dia_message(msg, MSGTYPE_REBOOT); free(msg); if(!window) util_disp_done(); - if(config.memory.ram_min) { + if(config.memoryXXX.ram_min) { config.manual = 1; if(config.test) { fprintf(stderr, "*** reboot ***\n"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/net.c new/linuxrc-3.5.15/net.c --- old/linuxrc-3.5.12/net.c 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/net.c 2011-10-18 09:41:37.000000000 +0200 @@ -861,6 +861,16 @@ } while(--delay > 0 && f && !config.net.hostname.ok && !config.net.hostname.ipv6); } + + if( + config.net.gateway.ok && + config.net.gateway.ipv6 && + (ip = inet_ntop(AF_INET6, &config.net.gateway.ip6, ip_buf, sizeof ip_buf)) + ) { + strprintf(&cmd, "route -A inet6 add default gw %s", ip); + err = system(cmd); + if(config.debug) fprintf(stderr, "%s = %d\n", cmd, err); + } } if(!err) { @@ -2394,10 +2404,17 @@ } } - IFNOTAUTO(config.hwp.readchan) if((rc=dia_input2_chopspace(txt_get(TXT_CTC_CHANNEL_READ), &config.hwp.readchan, 9, 0))) return rc; - if((rc=net_check_ccw_address(config.hwp.readchan))) return rc; - IFNOTAUTO(config.hwp.writechan) if((rc=dia_input2_chopspace(txt_get(TXT_CTC_CHANNEL_WRITE), &config.hwp.writechan, 9, 0))) return rc; - if((rc=net_check_ccw_address(config.hwp.writechan))) return rc; + IFNOTAUTO(config.hwp.readchan) + if((rc=dia_input2_chopspace(txt_get(TXT_CTC_CHANNEL_READ), &config.hwp.readchan, 9, 0))) + return rc; + if((rc=net_check_ccw_address(config.hwp.readchan))) + return rc; + IFNOTAUTO(config.hwp.writechan) + if((rc=dia_input2_chopspace(txt_get(TXT_CTC_CHANNEL_WRITE), &config.hwp.writechan, 9, 0))) + return rc; + if((rc=net_check_ccw_address(config.hwp.writechan))) + return rc; + return 0; } @@ -2683,7 +2700,7 @@ break; case di_390net_hsi: case di_390net_osa: - if (config.hwp.interface == di_390net_lcs) + if (config.hwp.interface == di_osa_lcs) goto setup_ctc; ccmd += sprintf(ccmd, "qeth_configure "); if(config.hwp.portno) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/rootimage.c new/linuxrc-3.5.15/rootimage.c --- old/linuxrc-3.5.12/rootimage.c 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/rootimage.c 2011-10-18 09:32:40.000000000 +0200 @@ -45,13 +45,13 @@ * * return: 0 ok, -1 error */ -int ask_for_swap(int size, char *msg) +int ask_for_swap(int64_t size, char *msg) { int i, j, did_init = 0; char *partition = NULL; char *argv[] = { NULL, NULL }; - if(size >= 0 && config.memory.current >= config.memory.min_free + size) return 0; + if(size >= 0 && config.memoryXXX.current >= config.memoryXXX.min_free + size) return 0; if(!config.win) { util_disp_init(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/rootimage.h new/linuxrc-3.5.15/rootimage.h --- old/linuxrc-3.5.12/rootimage.h 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/rootimage.h 2011-10-18 09:32:40.000000000 +0200 @@ -7,5 +7,5 @@ */ extern int root_boot_system (void); -int ask_for_swap(int size, char *msg); +int ask_for_swap(int64_t size, char *msg); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/settings.c new/linuxrc-3.5.15/settings.c --- old/linuxrc-3.5.12/settings.c 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/settings.c 2011-10-18 09:46:37.000000000 +0200 @@ -180,7 +180,7 @@ {lang_dummy, "", "us", SMALL_FONT, UNI_FONT, 0, 0, NULL, 0 }, }; -#if defined(__i386__) || defined(__x86_64__) || defined(__alpha__) || defined(__PPC__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__) || defined(__MIPSEB__) +#if defined(__i386__) || defined(__arm__) || defined(__x86_64__) || defined(__alpha__) || defined(__PPC__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__) || defined(__MIPSEB__) #define KEYMAP_DEFAULT "us" static keymap_t set_keymaps_arm [] = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.5.12/util.c new/linuxrc-3.5.15/util.c --- old/linuxrc-3.5.12/util.c 2011-09-13 15:38:51.000000000 +0200 +++ new/linuxrc-3.5.15/util.c 2011-10-18 09:38:02.000000000 +0200 @@ -1133,24 +1133,28 @@ slist_append_str(&sl0, buf); sprintf(buf, - "memory (kB): total %d, free %d (%d), ramdisk %d", - config.memory.total, config.memory.current, - config.memory.current - config.memory.free_swap, - config.memory.free - config.memory.current + "memory (MB): total %lld, free %lld (%lld), ramdisk %lld", + (long long) config.memoryXXX.total >> 20, + (long long) config.memoryXXX.current >> 20, + (long long) (config.memoryXXX.current - config.memoryXXX.free_swap) >> 20, + (long long) (config.memoryXXX.free - config.memoryXXX.current) >> 20 ); slist_append_str(&sl0, buf); sprintf(buf, - "memory limits: min %d, yast %d, image %d", - config.memory.min_free, config.memory.min_yast, config.memory.load_image + "memory limits (MB): min %lld, yast %lld, image %lld", + (long long) config.memoryXXX.min_free >> 20, + (long long) config.memoryXXX.min_yast >> 20, + (long long) config.memoryXXX.load_image >> 20 ); slist_append_str(&sl0, buf); util_get_ram_size(); sprintf(buf, - "RAM size (MB): total %u, min %u", - config.memory.ram, config.memory.ram_min + "RAM size (MB): total %lld, min %lld", + (long long) (config.memoryXXX.ram >> 20), + (long long) (config.memoryXXX.ram_min >> 20) ); slist_append_str(&sl0, buf); @@ -2559,7 +2563,7 @@ void util_free_mem() { file_t *f0, *f; - int i, mem_total = 0, mem_free = 0, mem_free_swap = 0; + int64_t i, mem_total = 0, mem_free = 0, mem_free_swap = 0; char *s; f0 = file_read_file("/proc/meminfo", kf_mem); @@ -2568,7 +2572,7 @@ switch(f->key) { case key_memtotal: case key_swaptotal: - i = strtoul(f->value, &s, 10); + i = strtoull(f->value, &s, 10); if(!*s || *s == ' ') mem_total += i; break; @@ -2576,7 +2580,7 @@ case key_buffers: case key_cached: case key_swapfree: - i = strtol(f->value, &s, 10); + i = strtoll(f->value, &s, 10); if(!*s || *s == ' ') { mem_free += i; if(f->key == key_swapfree) { @@ -2592,9 +2596,9 @@ file_free_file(f0); - config.memory.total = mem_total; - config.memory.free = mem_free; - config.memory.free_swap = mem_free_swap; + config.memoryXXX.total = mem_total << 10; + config.memoryXXX.free = mem_free << 10; + config.memoryXXX.free_swap = mem_free_swap << 10; util_update_meminfo(); } @@ -2602,11 +2606,7 @@ void util_update_meminfo() { - int rd_mem = 0; - - // FIXME: do something with download files ??? - - config.memory.current = config.memory.free - (rd_mem >> 10); + config.memoryXXX.current = config.memoryXXX.free; } @@ -2614,7 +2614,10 @@ { util_free_mem(); - printf("MemTotal: %9d kB\nMemFree: %10d kB\n", config.memory.total, config.memory.free); + printf("MemTotal: %9lld kB\nMemFree: %10lld kB\n", + (long long) (config.memoryXXX.total >> 10), + (long long) (config.memoryXXX.free >> 10) + ); return 0; } @@ -4124,7 +4127,7 @@ hd_t *hd; hd_res_t *res; - if(config.memory.ram) return; + if(config.memoryXXX.ram) return; hd_data = calloc(1, sizeof *hd_data); @@ -4133,8 +4136,8 @@ if(hd && hd->base_class.id == bc_internal && hd->sub_class.id == sc_int_main_mem) { for(res = hd->res; res; res = res->next) { if(res->any.type == res_phys_mem) { - config.memory.ram = res->phys_mem.range >> 20; - fprintf(stderr, "RAM size: %u MB\n", config.memory.ram); + config.memoryXXX.ram = res->phys_mem.range; + fprintf(stderr, "RAM size: %llu MB\n", (unsigned long long) (config.memoryXXX.ram >> 20)); break; } } continue with "q"... Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org