Changeset 244

Show
Ignore:
Timestamp:
04/26/07 18:07:59 (2 years ago)
Author:
ludo
Message:

linux inventory fixes. Uinewt bugfix. Save EFI partitions (from r4317)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/client/revimage/autorestore/revoinv

    r222 r244  
    6262diskinfo() 
    6363{ 
    64     NUM=-1 
    65     sfdisk -l -uS|grep /dev|tr -s " "|while read FIRST ALL 
     64    NUM=0 
     65    sfdisk -l -uS|grep /dev|tr -d "*"|tr -s " "|while read FIRST ALL 
    6666    do 
    6767        if [ $FIRST = "Disk" ] 
    6868        then 
     69            PNUM=0 
     70            C=`echo $ALL|cut -f 2 -d " "` 
     71            H=`echo $ALL|cut -f 4 -d " "` 
     72            S=`echo $ALL|cut -f 6 -d " "` 
     73            TOT=$(($C*$H*$S)) 
     74            echo "D:(hd$NUM):CHS($C,$H,$S)=$TOT" 
    6975            NUM=$(($NUM+1)) 
    70             echo "D:(hd$NUM):CHS()$ALL" 
    7176        else 
    72             echo "P:$ALL" 
     77            T=`echo $ALL|cut -f 4 -d " "` 
     78            S=`echo $ALL|cut -f 1 -d " "` 
     79            L=`echo $ALL|cut -f 3 -d " "` 
     80            [ "$S" = "0" ] && continue 
     81            [ "$T" = "5" ] && continue 
     82            echo "P:$PNUM,t:$T,s:$S,l:$L" 
     83            PNUM=$(($PNUM+1)) 
    7384        fi 
    7485    done 
     
    92103grep AuthenticAMD /proc/cpuinfo && CPUV=41 
    93104PCI=`pciinfo` 
    94 #diskinfo 
     105DI=`diskinfo` 
    95106 
    96107DATA="M:280,U:$MEM 
    97108$PCI 
    98109C:$CPU1,$CPU2,0,$CPU4,0,0,0,0,0,0,0,0,$CPUV 
    99 F:$FREQ" 
     110F:$FREQ 
     111$DI" 
    100112 
    101113if [ "$1" != "stdout" ]; then 
  • trunk/client/revimage/autosave/autosave.c

    r197 r244  
    616616        } 
    617617 
    618         if (ttype[i] == 0x12) { 
    619             /* Save as raw: compaq diag */ 
     618        if (ttype[i] == 0x12 || ttype[i] == 0xee || ttype[i] == 0xef) { 
     619            /* Save as raw: compaq diag, EFI partitions */ 
    620620            tmprintf("%s/image_raw %s ?", revobin, device); 
    621621            if (mysystem(tmppath) == 0) { 
  • trunk/client/revimage/ui_newt/ui_newt.c

    r197 r244  
    424424  newtRefresh (); 
    425425 
    426   while (getchar() != 'c') 
    427     sleep(1); 
     426  waitkey(); 
    428427   
    429428  newtPopWindow(); 
     
    432431 
    433432  return "OK"; 
     433} 
     434 
     435/* 
     436 * Wait for the 'c' key 
     437 */ 
     438void waitkey(void) 
     439{ 
     440    int fd;                                                                       
     441                                                                                  
     442    fd = open("/dev/input/event1", O_RDONLY); 
     443    if (fd != -1) { 
     444        unsigned short ev[8]; 
     445 
     446        while (read(fd, &ev, sizeof(ev))) { 
     447            if (ev[5] == 0x2e) { 
     448                break; 
     449            } 
     450        } 
     451        close(fd); 
     452    } 
     453    sleep(1); 
    434454} 
    435455 
  • trunk/client/revimage/ui_newt/ui_newt.h

    r197 r244  
    55#define UI_READ_ERROR2 ui_read_error(__FILE__,__LINE__, errno, 0) 
    66 
    7 //void update_progress(int); 
    87void update_file(int); 
    98int stats(void); 
     
    1312 
    1413void ui_write_error(void); 
    15 //void ui_read_error(char *s, int l, int err, int fd); 
    1614void fatal(void); 
     15void waitkey(void);