From owner-freebsd-arch Mon Dec 9 12:36:20 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0BCF737B401; Mon, 9 Dec 2002 12:36:19 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B8A143EA9; Mon, 9 Dec 2002 12:36:18 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id gB9Ka93p076089; Mon, 9 Dec 2002 21:36:09 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Maxime Henrion Cc: Nate Lawson , "M. Warner Losh" , arch@freebsd.org Subject: Re: le??toh, etc in userland From: phk@freebsd.org In-Reply-To: Your message of "Mon, 09 Dec 2002 12:34:42 PST." <20021209203442.GB27086@elvis.mu.org> Date: Mon, 09 Dec 2002 21:36:09 +0100 Message-ID: <76088.1039466169@critter.freebsd.dk> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20021209203442.GB27086@elvis.mu.org>, Maxime Henrion writes: >> Already present in CAM (sys/cam/ssi_all.h): >> static __inline void scsi_ulto2b(u_int32_t val, u_int8_t *bytes); >> static __inline void scsi_ulto3b(u_int32_t val, u_int8_t *bytes); >> static __inline void scsi_ulto4b(u_int32_t val, u_int8_t *bytes); >> static __inline u_int32_t scsi_2btoul(u_int8_t *bytes); >> static __inline u_int32_t scsi_3btoul(u_int8_t *bytes); >> static __inline int32_t scsi_3btol(u_int8_t *bytes); >> static __inline u_int32_t scsi_4btoul(u_int8_t *bytes); >> >> I would love to have a 64 bit version and map these to a generic host >> version. It should use u_int8_t instead of u_char though. > >It should even use uintXX_t instead of u_intXX_t, since the former is >the standard C99 types. I think the ones in sys/geom/geom_enc.c does the right thing, apart from the "g_" prefix. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message