Date: Thu, 28 May 2009 08:29:09 GMT From: Sylvestre Gallon <syl@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 162932 for review Message-ID: <200905280829.n4S8T9q4074796@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=162932 Change 162932 by syl@syl_rincewind on 2009/05/28 08:28:26 Use fprintf(stderr, ...) for error messages. Affected files ... .. //depot/projects/soc2009/syl_usb/libusb-tests/descriptors/test1/test1.c#2 edit Differences ... ==== //depot/projects/soc2009/syl_usb/libusb-tests/descriptors/test1/test1.c#2 (text+ko) ==== @@ -13,7 +13,7 @@ int ret; int i; - printf("This function will print out all the device" + printf("This program will print out all the device" " descriptors for all the present devices.\n"); ddesc = malloc(sizeof(libusb_device_descriptor)); @@ -23,18 +23,18 @@ } if (libusb_init(&ctx) != 0) { - printf("libusb_init failed\n"); + fprintf(stderr, "libusb_init failed\n"); return (EXIT_FAILURE); } if ((ret = libusb_get_device_list(ctx, &devs_list)) < 0) { - printf("libusb_get_device_list failed with 0x%x error code\n", + fprintf(stderr,"libusb_get_device_list failed with 0x%x error code\n", ret); return (EXIT_FAILURE); } if (ret == 0) { - printf("No device match or lack of permissions.\n"); + fprintf(stderr, "No device match or lack of permissions.\n"); return (EXIT_SUCCESS); } printf("\nThere are %i devices\n\n", ret);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905280829.n4S8T9q4074796>