[Nouveau] [PATCH] nv_driver: use field width format to dump chip family

canbaby canbaby at 21cn.com
Thu Mar 18 01:48:35 PDT 2010


Is this the correct maillist to post things about xf86-video-nouveau?

This is my first nouveau patch, since I had a laptop with a GeForce
9300M GS card, I will play with it now.

This patch is just clean and simplified of codes.

---
 src/nv_driver.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/src/nv_driver.c b/src/nv_driver.c
index 4b00e3d..06bf160 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -182,14 +182,7 @@ NVIdentify(int flags)
     family = NVKnownFamilies;
     while(family->name && family->chipset)
     {
-        size_t len = strlen(family->name);
-        xf86ErrorF("\t%s", family->name);
-        while(len<maxLen+1)
-        {
-            xf86ErrorF(" ");
-            len++;
-        }
-        xf86ErrorF("(%s)\n", family->chipset);
+        xf86ErrorF("\t%-*s (%s)\n", maxLen, family->name,
family->chipset);
         family++;
     }
 }
-- 
1.6.4.GIT




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20100318/cd288479/attachment.htm>


More information about the Nouveau mailing list