From owner-p4-projects@FreeBSD.ORG Thu May 28 08:29:10 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5B4CD1065674; Thu, 28 May 2009 08:29:10 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B4481065670 for ; Thu, 28 May 2009 08:29:10 +0000 (UTC) (envelope-from syl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 09A298FC0A for ; Thu, 28 May 2009 08:29:10 +0000 (UTC) (envelope-from syl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n4S8T963074798 for ; Thu, 28 May 2009 08:29:09 GMT (envelope-from syl@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n4S8T9q4074796 for perforce@freebsd.org; Thu, 28 May 2009 08:29:09 GMT (envelope-from syl@FreeBSD.org) Date: Thu, 28 May 2009 08:29:09 GMT Message-Id: <200905280829.n4S8T9q4074796@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to syl@FreeBSD.org using -f From: Sylvestre Gallon To: Perforce Change Reviews Cc: Subject: PERFORCE change 162932 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2009 08:29:11 -0000 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);