~ubuntu-branches/debian/sid/lvm2/sid

« back to all changes in this revision

Viewing changes to daemons/clvmd/clvmd-command.c

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2014-08-19 15:37:06 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20140819153706-i1gaio8lg534dara
Tags: 2.02.109-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
        unsigned char lock_cmd;
79
79
        unsigned char lock_flags;
80
80
 
81
 
        /* Reset test mode before we start */
82
 
        init_test(0);
83
 
 
84
81
        /* Do the command */
85
82
        switch (msg->cmd) {
86
83
                /* Just a test message */
112
109
                lockname = &args[2];
113
110
                /* Check to see if the VG is in use by LVM1 */
114
111
                status = do_check_lvm1(lockname);
115
 
                if (lock_flags & LCK_TEST_MODE)
116
 
                        init_test(1);
117
112
                do_lock_vg(lock_cmd, lock_flags, lockname);
118
113
                break;
119
114
 
122
117
                lock_cmd = args[0];
123
118
                lock_flags = args[1];
124
119
                lockname = &args[2];
125
 
                if (lock_flags & LCK_TEST_MODE)
126
 
                        init_test(1);
127
120
                status = do_lock_lv(lock_cmd, lock_flags, lockname);
128
121
                /* Replace EIO with something less scary */
129
122
                if (status == EIO) {
252
245
        int status = 0;
253
246
        char *lockname;
254
247
 
255
 
        init_test(0);
256
248
        switch (header->cmd) {
257
249
        case CLVMD_CMD_TEST:
258
250
                status = sync_lock("CLVMD_TEST", LCK_EXCL, 0, &lockid);
271
263
                lock_cmd = args[0];
272
264
                lock_flags = args[1];
273
265
                lockname = &args[2];
274
 
                if (lock_flags & LCK_TEST_MODE)
275
 
                        init_test(1);
276
266
                status = pre_lock_lv(lock_cmd, lock_flags, lockname);
277
267
                break;
278
268
 
304
294
        char *args = header->node + strlen(header->node) + 1;
305
295
        char *lockname;
306
296
 
307
 
        init_test(0);
308
297
        switch (header->cmd) {
309
298
        case CLVMD_CMD_TEST:
310
299
                status = sync_unlock("CLVMD_TEST", (int) (long) client->bits.localsock.private);
315
304
                lock_cmd = args[0];
316
305
                lock_flags = args[1];
317
306
                lockname = &args[2];
318
 
                if (lock_flags & LCK_TEST_MODE)
319
 
                        init_test(1);
320
307
                status = post_lock_lv(lock_cmd, lock_flags, lockname);
321
308
                break;
322
309