From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Bc7kok2Qk4fG for ; Tue, 19 Mar 2013 07:23:26 +0100 (CET) Received: from mail-ee0-f43.google.com (mail-ee0-f43.google.com [74.125.83.43]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Tue, 19 Mar 2013 07:23:25 +0100 (CET) Received: by mail-ee0-f43.google.com with SMTP id c50so48130eek.2 for ; Mon, 18 Mar 2013 23:23:25 -0700 (PDT) Message-ID: <51480423.7040807@gmail.com> Date: Tue, 19 Mar 2013 07:22:27 +0100 From: Milan Broz MIME-Version: 1.0 References: <51478EC4.4020006@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] an official way to know if the underlying device is gone for all supported volume formats List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mhogomchungu@gmail.com Cc: dm-crypt On 19.3.2013 3:24, .. ink .. wrote: > and what about truecrypt volume? The point is that when the > underlying device is gone,the API becomes contradicting and > unpredictable as it start to exhibit undocumented behaviors. No, crypt_get_type() should return NULL in this case ("unknown"). This is documented value. ... > There is another API i do not remember at the moment than return > undocumented NULL in this situation. For unknown type the query operations are not defined (resp. you get NULL) because itnerenaly it is is nor (yet) recognised. But yes, it should be probably unified and documented better (NULL seems to missing in doc in some query commands). (In fact, underlying device cannot disapper if in use - there is still (in kernel) some reference used in maping table but userspace behaves diferently seems.) Milan