[parted-devel] Re: Parted 1.8.0rc1 changes.
Debarshi 'Rishi' Ray
debarshi.ray at gmail.com
Thu Sep 21 14:56:27 UTC 2006
Here is patch (diff -c) against parted/parted.c from the 1.8.0rc1
tarball to incorporate both model and transport information.
*** parted.c 2006-09-21 20:22:02.000000000 +0000
--- parted.rishi.c 2006-09-21 20:21:16.000000000 +0000
***************
*** 1192,1197 ****
--- 1192,1198 ----
int has_num_arg = 0;
int has_free_arg = 0;
int has_all_arg = 0;
+ char* transport[12] = {"unknown", "scsi", "ide",
"dac960", "cpqarray", "file", "ataraid", "i2o", "ubd", "dasd",
"viodasd", "sx8"};
char* peek_word;
char* start;
char* end;
***************
*** 1252,1257 ****
--- 1253,1259 ----
- 1 );
printf ("\n");
/* TODO: insert dev->model and transport here */
+ printf(_("Model: %s (%s)\n"), (*dev)->model, transport[(*dev)->type]);
printf (_("Disk %s: %s\n"), (*dev)->path, end);
printf (_("Sector size (logical/physical): %lldB/%lldB\n"),
(*dev)->sector_size, (*dev)->phys_sector_size);
>> By the way, what is being referred to as 'transport'?
> The bus type, e.g. IDE, SCSI, ... (it's an enum).
However in line 74 of include/parted/device.h the usage of
PedDeviceType has been deprecated. Is there any replacement for it?
Happy hacking,
Debarshi
--
Anything free is worth what you pay for it.
More information about the parted-devel
mailing list