On Mon, Feb 16, 2009 at 9:21 AM, David Vrabel <david.vrabel@xxxxxxx> wrote: > Gustavo F. Padovan wrote: >> >> @@ -1922,7 +1922,7 @@ static void cmd_lst(int dev_id, int argc, char **argv) >> if (dev_id < 0) { >> dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr); >> if (dev_id < 0) { >> - fprintf(stderr, "Not connected.\n"); >> + perror("Not connected."); >> exit(1); >> } >> } > > You should only perror() if errno is valid for the error being reported. > Otherwise you're going to get odd messages like: > > Not connected.: Success Ok. You are right. > > David > -- > David Vrabel, Senior Software Engineer, Drivers > CSR, Churchill House, Cambridge Business Park, Tel: +44 (0)1223 692562 > Cowley Road, Cambridge, CB4 0WZ http://www.csr.com/ > -- Gustavo F. Padovan Computer Engineering Student Institute of Computing - IC University of Campinas - UNICAMP email: gustavo@xxxxxxxxxxxxxxxxx gtalk: gfpadovan@xxxxxxxxx mobile: +55 19 81030803 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html