use stderr for printing usage messages

This commit is contained in:
plunky 2007-11-06 21:35:52 +00:00
parent 26a4d1cf14
commit bbbbeb6a46

View File

@ -1,4 +1,4 @@
/* $NetBSD: search.c,v 1.5 2007/11/04 09:02:47 plunky Exp $ */ /* $NetBSD: search.c,v 1.6 2007/11/06 21:35:52 plunky Exp $ */
/*- /*-
* Copyright (c) 2006 Itronix Inc. * Copyright (c) 2006 Itronix Inc.
@ -55,12 +55,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: search.c,v 1.5 2007/11/04 09:02:47 plunky Exp $ * $Id: search.c,v 1.6 2007/11/06 21:35:52 plunky Exp $
* $FreeBSD: src/usr.sbin/bluetooth/sdpcontrol/search.c,v 1.4 2005/05/27 19:11:33 emax Exp $ * $FreeBSD: src/usr.sbin/bluetooth/sdpcontrol/search.c,v 1.4 2005/05/27 19:11:33 emax Exp $
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__RCSID("$NetBSD: search.c,v 1.5 2007/11/04 09:02:47 plunky Exp $"); __RCSID("$NetBSD: search.c,v 1.6 2007/11/06 21:35:52 plunky Exp $");
#include <netinet/in.h> #include <netinet/in.h>
#include <bluetooth.h> #include <bluetooth.h>
@ -661,9 +661,9 @@ do_sdp_search(bdaddr_t *laddr, bdaddr_t *raddr, int argc, char const **argv)
return EXIT_SUCCESS; return EXIT_SUCCESS;
usage: usage:
printf("Known services:\n"); fprintf(stderr, "Known services:\n");
for (s = services ; s->name != NULL ; s++) for (s = services ; s->name != NULL ; s++)
printf("\t%s\t%s\n", s->name, s->description); fprintf(stderr, "\t%s\t%s\n", s->name, s->description);
return EXIT_FAILURE; return EXIT_FAILURE;
} /* do_sdp_search */ } /* do_sdp_search */