From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-bw0-f49.google.com ([209.85.214.49]) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OYs3v-0006Pn-UR for linux-mtd@lists.infradead.org; Wed, 14 Jul 2010 02:51:08 +0000 Received: by bwz8 with SMTP id 8so1072754bwz.36 for ; Tue, 13 Jul 2010 19:51:06 -0700 (PDT) Subject: Re: [PATCHv2 4/5] libmtd: add support for 64-bit offsets, OOB From: Artem Bityutskiy To: Kevin Cernekee In-Reply-To: References: <1279018143.31639.33.camel@localhost> Content-Type: text/plain; charset="UTF-8" Date: Wed, 14 Jul 2010 05:51:01 +0300 Message-Id: <1279075861.3212.23.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: linux-mtd@lists.infradead.org, jwboyer@gmail.com, saeed.bishara@gmail.com, vapier.adi@gmail.com Reply-To: dedekind1@gmail.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 2010-07-13 at 17:09 -0700, Kevin Cernekee wrote: > On Tue, Jul 13, 2010 at 3:49 AM, Artem Bityutskiy wrote: > > You should find out whether the new ioctl's are supported in > > 'libmtd_open()'. This also means that all libmtd calls which need this > > flag will need a 'libmtd_t desc' parameter. > > Typically I just try the new ioctl first, then fall back to the old > one if it returned -ENOTTY. Could you recommend a way to detect the > presence of the new ioctls from libmtd_open()? Hmm, how about MEMERASE64 with start = length = -1? You can distinguish between -ENOTTY and other error codes. -- Best Regards, Artem Bityutskiy (Артём Битюцкий)