From owner-freebsd-standards Tue Feb 26 21:52: 2 2002 Delivered-To: freebsd-standards@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 3CC9E37B400 for ; Tue, 26 Feb 2002 21:51:52 -0800 (PST) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g1R5poi37525 for ; Tue, 26 Feb 2002 22:51:51 -0700 (MST) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g1R5poL31332 for ; Tue, 26 Feb 2002 22:51:50 -0700 (MST) (envelope-from imp@village.org) Date: Tue, 26 Feb 2002 22:51:37 -0700 (MST) Message-Id: <20020226.225137.13083739.imp@village.org> To: standards@FreeBSD.ORG Subject: Quick review please on chio patch From: "M. Warner Losh" X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Tue_Feb_26_22:51:37_2002_344)--" Content-Transfer-Encoding: 7bit Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----Next_Part(Tue_Feb_26_22:51:37_2002_344)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mike Barcroft asked me to do a u_int*_t -> uint*t sweep of the tree while I was at the __P stuff. I just did chio and thought I'd let people here comment on my patches. Warner ----Next_Part(Tue_Feb_26_22:51:37_2002_344)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename=chio-patch Index: chio.c =================================================================== RCS file: /cache/ncvs/src/bin/chio/chio.c,v retrieving revision 1.20 diff -u -r1.20 chio.c --- chio.c 2 Feb 2002 06:15:21 -0000 1.20 +++ chio.c 27 Feb 2002 05:48:45 -0000 @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -65,7 +66,7 @@ static int is_special(char *); static const char *bits_to_string(ces_status_flags, const char *); -static void find_element(char *, u_int16_t *, u_int16_t *); +static void find_element(char *, uint16_t *, uint16_t *); static struct changer_element_status *get_element_status (unsigned int, unsigned int); @@ -945,7 +946,7 @@ { struct changer_element_status *ces; struct changer_move cmd; - u_int16_t type, element; + uint16_t type, element; ++argv; --argc; @@ -1017,8 +1018,8 @@ (void)memset(&cesr, 0, sizeof(cesr)); - cesr.cesr_element_type = (u_int16_t)type; - cesr.cesr_element_base = (u_int16_t)element; + cesr.cesr_element_type = (uint16_t)type; + cesr.cesr_element_base = (uint16_t)element; cesr.cesr_element_count = 1; /* Only this one element */ cesr.cesr_flags |= CESR_VOLTAGS; /* Grab voltags as well */ cesr.cesr_element_status = ces; @@ -1041,7 +1042,7 @@ * and iterate until we find a match, or crap out. */ static void -find_element(char *voltag, u_int16_t *et, u_int16_t *eu) +find_element(char *voltag, uint16_t *et, uint16_t *eu) { struct changer_params cp; struct changer_element_status_request cesr; ----Next_Part(Tue_Feb_26_22:51:37_2002_344)---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message