ia64/xen-unstable

changeset 496:11b14ed1bf78

bitkeeper revision 1.268 (3f0559790jS_a4S9XzxupGBulKlRxQ)

Parse read/write mode in xi_phys_probe so that front-end doesn't need to know what the mode bits mean.
author rac61@labyrinth.cl.cam.ac.uk
date Fri Jul 04 10:39:53 2003 +0000 (2003-07-04)
parents 7363ede764ed
children 4b8ce663794b
files tools/internal/xi_phys_probe.c
line diff
     1.1 --- a/tools/internal/xi_phys_probe.c	Fri Jul 04 10:27:28 2003 +0000
     1.2 +++ b/tools/internal/xi_phys_probe.c	Fri Jul 04 10:39:53 2003 +0000
     1.3 @@ -35,10 +35,13 @@ int main(int argc, char *argv[])
     1.4        break;
     1.5  
     1.6      for (x = 0; x < buf.n_aces; x++) {
     1.7 -      printf("%x %x %x %x\n", buf.entries[x].device,
     1.8 +      char read = ( buf.entries[x].mode & 1 ? 'r' : ' ' );
     1.9 +      char write = ( buf.entries[x].mode & 2 ? 'w' : ' ' );
    1.10 +      printf("%x %x %x %c%c\n", buf.entries[x].device,
    1.11  	     buf.entries[x].start_sect,
    1.12  	     buf.entries[x].n_sectors,
    1.13 -	     buf.entries[x].mode);
    1.14 +	     read,
    1.15 +	     write);
    1.16      }
    1.17      buf.start_ind += buf.n_aces;
    1.18    } while (buf.n_aces == PHYSDISK_MAX_ACES_PER_REQUEST);