From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: util-linux-owner@vger.kernel.org Received: from mx1.redhat.com ([209.132.183.28]:22806 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751576AbaD1JrD (ORCPT ); Mon, 28 Apr 2014 05:47:03 -0400 Date: Mon, 28 Apr 2014 11:00:03 +0200 From: Karel Zak To: kerolasa@gmail.com Cc: Benno Schulenberg , Util-Linux Subject: Re: [PATCH 08/12] swapon: swaps with legacy version label are not supported Message-ID: <20140428090003.GM2405@x2.net.home> References: <1398629138-31718-1-git-send-email-kerolasa@iki.fi> <1398629138-31718-9-git-send-email-kerolasa@iki.fi> <1398674252.3689.111120501.427ACD73@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: util-linux-owner@vger.kernel.org List-ID: On Mon, Apr 28, 2014 at 09:44:01AM +0100, Sami Kerola wrote: > On 28 April 2014 09:37, Benno Schulenberg wrote: > > > > On Sun, Apr 27, 2014, at 22:05, Sami Kerola wrote: > >> - if (memcmp(buf, "SWAP-SPACE", 10) == 0 || > >> - memcmp(buf, "SWAPSPACE2", 10) == 0) > >> + if (memcmp(buf, SWAP_SIGNATURE, 10) == 0) > > > > s/10/SWAP_SIGNATURE_SZ/ ? > > Hi Benno, > > Yes, that would be better. Karel, can you amend & add Benno as reviewer? Sure, what about to add macro is_swap_magic() to include/ to hide all the details? BTW, there is also libblkid/src/superblocks/swap.c :-) Karel -- Karel Zak http://karelzak.blogspot.com