From: canbaby Subject: [PATCH] nv_driver: use field width format to dump chip family Date: Thu, 18 Mar 2010 16:48:35 +0800 Message-ID: <1268902115.9988.1.camel@wucan-laptop> Reply-To: canbaby-0GSiYjBpcig@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1815940308==" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: nouveau.vger.kernel.org --===============1815940308== Content-Type: multipart/alternative; boundary="=-0CkC42Z0NmKx69nJMgCO" --=-0CkC42Z0NmKx69nJMgCO Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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(lenchipset); + xf86ErrorF("\t%-*s (%s)\n", maxLen, family->name, family->chipset); family++; } } -- 1.6.4.GIT --=-0CkC42Z0NmKx69nJMgCO Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit 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




--=-0CkC42Z0NmKx69nJMgCO-- --===============1815940308== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Nouveau mailing list Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org http://lists.freedesktop.org/mailman/listinfo/nouveau --===============1815940308==--