Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030199AbWJCPZF (ORCPT ); Tue, 3 Oct 2006 11:25:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030196AbWJCPZF (ORCPT ); Tue, 3 Oct 2006 11:25:05 -0400 Received: from mout2.freenet.de ([194.97.50.155]:23008 "EHLO mout2.freenet.de") by vger.kernel.org with ESMTP id S1030193AbWJCPZA (ORCPT ); Tue, 3 Oct 2006 11:25:00 -0400 Date: Tue, 03 Oct 2006 17:25:56 +0200 To: "linux-kernel@vger.kernel.org" Subject: [PATCH 5/11] 2.6.18-mm3 pktcdvd: new pkt_print_info() function Reply-To: balagi@justmail.de From: "Thomas Maier" Cc: "petero2@telia.com" , "akpm@osdl.org" Content-Type: multipart/mixed; boundary=----------rwRBIe130ftI3uuMsNhGKW MIME-Version: 1.0 Message-ID: User-Agent: Opera Mail/9.00 (Win32) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8707 Lines: 148 ------------rwRBIe130ftI3uuMsNhGKW Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Hello, this patch moves the "print" code from pkt_seq_show() into a new function pkt_print_info() for reusability. http://people.freenet.de/BalaGi/download/pktcdvd-5-print-info_2.6.18.patch Signed-off-by: Thomas Maier -Thomas Maier ------------rwRBIe130ftI3uuMsNhGKW Content-Disposition: attachment; filename=pktcdvd-5-print-info_2.6.18.patch Content-Type: application/octet-stream; name=pktcdvd-5-print-info_2.6.18.patch Content-Transfer-Encoding: Base64 ZGlmZiAtdXJwTiA0LW1vZGlmeS1wcm9jZnMvZHJpdmVycy9ibG9jay9wa3RjZHZk LmMgNS1wcmludC1pbmZvL2RyaXZlcnMvYmxvY2svcGt0Y2R2ZC5jCi0tLSA0LW1v ZGlmeS1wcm9jZnMvZHJpdmVycy9ibG9jay9wa3RjZHZkLmMJMjAwNi0xMC0wMyAx MTo0NTo1Ni4wMDAw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RfaW5mbyhw ZCwgYnVmLCBzaXplb2YoYnVmKSk7CisJc2VxX3ByaW50ZihtLCAiJXMiLCBidWYp OwogCXJldHVybiAwOwogfQogCg== ------------rwRBIe130ftI3uuMsNhGKW-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/