ata_id.c | ata_id.c | |||
---|---|---|---|---|
skipping to change at line 413 | skipping to change at line 413 | |||
if (out_is_packet_device != NULL) | if (out_is_packet_device != NULL) | |||
*out_is_packet_device = is_packet_device; | *out_is_packet_device = is_packet_device; | |||
return ret; | return ret; | |||
} | } | |||
_printf_(6,0) | _printf_(6,0) | |||
static void log_fn(struct udev *udev, int priority, | static void log_fn(struct udev *udev, int priority, | |||
const char *file, int line, const char *fn, | const char *file, int line, const char *fn, | |||
const char *format, va_list args) | const char *format, va_list args) | |||
{ | { | |||
vsyslog(priority, format, args); | log_metav(priority, file, line, fn, format, args); | |||
} | } | |||
int main(int argc, char *argv[]) | int main(int argc, char *argv[]) | |||
{ | { | |||
struct udev *udev; | struct udev *udev; | |||
struct hd_driveid id; | struct hd_driveid id; | |||
uint8_t identify[512]; | uint8_t identify[512]; | |||
uint16_t *identify_words; | uint16_t *identify_words; | |||
char model[41]; | char model[41]; | |||
char model_enc[256]; | char model_enc[256]; | |||
skipping to change at line 438 | skipping to change at line 438 | |||
int fd; | int fd; | |||
uint16_t word; | uint16_t word; | |||
int rc = 0; | int rc = 0; | |||
int is_packet_device = 0; | int is_packet_device = 0; | |||
static const struct option options[] = { | static const struct option options[] = { | |||
{ "export", no_argument, NULL, 'x' }, | { "export", no_argument, NULL, 'x' }, | |||
{ "help", no_argument, NULL, 'h' }, | { "help", no_argument, NULL, 'h' }, | |||
{} | {} | |||
}; | }; | |||
log_parse_environment(); | ||||
log_open(); | ||||
udev = udev_new(); | udev = udev_new(); | |||
if (udev == NULL) | if (udev == NULL) | |||
goto exit; | goto exit; | |||
log_open(); | ||||
udev_set_log_fn(udev, log_fn); | udev_set_log_fn(udev, log_fn); | |||
while (1) { | while (1) { | |||
int option; | int option; | |||
option = getopt_long(argc, argv, "xh", options, NULL); | option = getopt_long(argc, argv, "xh", options, NULL); | |||
if (option == -1) | if (option == -1) | |||
break; | break; | |||
switch (option) { | switch (option) { | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 4 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |