Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jan 2014 22:05:59 -0800 (PST)
From:      Nomad Esst <noname.esst@yahoo.com>
To:        John Baldwin <jhb@freebsd.org>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Access pci devices' serial numbers programmatically
Message-ID:  <1389765959.45668.YahooMailNeo@web162702.mail.bf1.yahoo.com>
In-Reply-To: <201401140824.03549.jhb@freebsd.org>
References:  <1389515545.51283.YahooMailNeo@web162704.mail.bf1.yahoo.com> <1389678825.62302.YahooMailNeo@web162702.mail.bf1.yahoo.com> <1389679735.19797.YahooMailNeo@web162702.mail.bf1.yahoo.com> <201401140824.03549.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Yes I'm trying to get these information from user-land. Any ideas now?=0A=
=0A=0A=0AOn Tuesday, January 14, 2014 4:54 PM, John Baldwin <jhb@freebsd.or=
g> wrote:=0A =0AOn Tuesday, January 14, 2014 1:08:55 am Nomad Esst wrote:=
=0A>> Thank you. The thing is one of the input arguments of this function i=
s =0A>device_t. How can I get this struct by device name so I can pass it t=
o =0A>pci_get_vpd_readonly function?=0A>=0A>If you are in a device driver m=
ethod such as probe or attach, you should=0A>already have the device_t avai=
lable.=A0 Are you trying to query this from=0A>userland?=0A>=0A>=0A>-- =0A>=
John Baldwin=0A>=0A>=0A>
From owner-freebsd-hackers@FreeBSD.ORG  Thu Jan 16 12:38:33 2014
Return-Path: <owner-freebsd-hackers@FreeBSD.ORG>
Delivered-To: freebsd-hackers@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id DCD309C8
 for <freebsd-hackers@freebsd.org>; Thu, 16 Jan 2014 12:38:33 +0000 (UTC)
Received: from mta05.bitpro.no (mta05.bitpro.no [92.42.64.202])
 by mx1.freebsd.org (Postfix) with ESMTP id 979D2140F
 for <freebsd-hackers@freebsd.org>; Thu, 16 Jan 2014 12:38:33 +0000 (UTC)
Received: from mail.lockless.no (mail.lockless.no [46.29.221.38])
 by mta05.bitpro.no (Postfix) with ESMTPS id 584A517FCA1
 for <freebsd-hackers@freebsd.org>; Thu, 16 Jan 2014 13:38:25 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
 by mail.lockless.no (Postfix) with ESMTP id E04688EEB8D
 for <freebsd-hackers@freebsd.org>; Thu, 16 Jan 2014 13:39:13 +0100 (CET)
X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no
Received: from mail.lockless.no ([127.0.0.1])
 by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id iKBA7h0sLGuS for <freebsd-hackers@freebsd.org>;
 Thu, 16 Jan 2014 13:39:13 +0100 (CET)
Received: from laptop015.home.selasky.org
 (cm-176.74.213.204.customer.telag.net [176.74.213.204])
 by mail.lockless.no (Postfix) with ESMTPSA id 4DDB48EE2AF
 for <freebsd-hackers@freebsd.org>; Thu, 16 Jan 2014 13:39:13 +0100 (CET)
Message-ID: <52D7D302.3090403@bitfrost.no>
Date: Thu, 16 Jan 2014 13:39:30 +0100
From: Hans Petter Selasky <hps@bitfrost.no>
Organization: Bitfrost A/S
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64;
 rv:24.0) Gecko/20100101 Thunderbird/24.1.0
MIME-Version: 1.0
To: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject: Make "sys/queue.h" usable with C++
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: freebsd-hackers@freebsd.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Technical Discussions relating to FreeBSD
 <freebsd-hackers.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-hackers>, 
 <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers/>;
List-Post: <mailto:freebsd-hackers@freebsd.org>
List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>,
 <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Jan 2014 12:38:33 -0000

Hi,

I'm using "sys/queue.h" with some C++ programs. The only problem is that 
you cannot make an ENTRY() using classes without getting some compiler 
warnings, because all macros in "sys/queue.h" assume "struct".

My simple patch is to add something like:

#ifdef "C++"
#define QUEUE_STRUCT
#else
#define QUEUE_STRUCT struct
#endif

And use QUEUE_STRUCT instead of "struct" everywhere inside 
"sys/queue.h". Any opinions about this?

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1389765959.45668.YahooMailNeo>