WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] FW: Is it a correct place for VBD information?

To: "'Keir Fraser'" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] FW: Is it a correct place for VBD information?
From: "Satoshi Uchida" <s-uchida@xxxxxxxxxxxxx>
Date: Wed, 28 Jun 2006 10:15:08 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 27 Jun 2006 18:15:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <2e4c8dd38360b9ba7993cc9de7dba768@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcaZ4K/uTuT5kNYySd+MMQ4ClS9bkQAaJXDA
Hi, Kier.

> 
> On 27 Jun 2006, at 12:28, Satoshi Uchida wrote:
> 
> >
> > Sorry.
> > You will be sure What I mean hear  by following patch.
> > I sent this patch formally after applying the sysfs patch.
> > This patch is to clear code, namely no give additional 
> function, so I 
> > do not sent now.
> 
> Do you really think that's better than just writing the 
> string literals directly in the macro uses?
> 
> e.g.,
> VBD_SHOW(physical_device, "%x:%x", be->major, be->minor); 
> VBD_SHOW(mode, "%s", be->mode);
> 
> Also, the "\n" can be removed from the caller strings and 
> placed inside the VBD_SHOW macro:
>   .... format "\n" .....
> 
> The compiler will concatenate the string literals.
> 

I think that it is OK using macros or literals.

In Linux net/core/net-sysfs.c., the 'fmt' representation is used by statistical 
data.
In the other, it is used literals or define show function directly.
Therefore, representation will be not unified in detail.
(Perhaps, macro is not better in net/core/net-sysfs.c)

I think that it is useful for recognizing data type and interesting,
and so used fmt representation.

In Linux, "\n" is written in format even if using literals.
However, I think that above representation is interesting and 
want to use idea if using literals.

Please comment, using fmt macro or literals.



Thanks
Satoshi UCHIDA


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel