Date: Tue, 26 Feb 2002 22:51:37 -0700 (MST) From: "M. Warner Losh" <imp@village.org> To: standards@FreeBSD.ORG Subject: Quick review please on chio patch Message-ID: <20020226.225137.13083739.imp@village.org>
next in thread | raw e-mail | index | archive | help
----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 <err.h> #include <fcntl.h> #include <stdio.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020226.225137.13083739.imp>