~siretart/cryptsetup/debian

« back to all changes in this revision

Viewing changes to lib/libdevmapper.c

  • Committer: Reinhard Tartler
  • Date: 2008-05-25 17:39:22 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: siretart@tauware.de-20080525173922-popbnh1gtbt3rxis
merge new upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#define CRYPT_TARGET    "crypt"
20
20
 
 
21
#define UDEVSETTLE      "/sbin/udevsettle"
 
22
 
 
23
static void run_udevsettle(void)
 
24
{
 
25
        system(UDEVSETTLE);
 
26
}
 
27
 
21
28
static void set_dm_error(int level, const char *file, int line,
22
29
                         const char *f, ...)
23
30
{
184
191
        if (dmi.read_only)
185
192
                options->flags |= CRYPT_FLAG_READONLY;
186
193
 
 
194
        /* run udevsettle to avoid a race in libdevmapper causing busy dm devices */
 
195
        run_udevsettle();
 
196
 
187
197
        r = 0;
188
198
        
189
199
out:
258
268
        options->skip = 0;
259
269
        options->size = length;
260
270
        if (details) {
261
 
                char *cipher, *key_, *device, *tmp;
 
271
                char *cipher, *key_, *device;
262
272
                uint64_t val64;
263
273
 
264
274
                set_error("Invalid dm table");