Revision 617fbbc1
b/qga/commands-posix.c | ||
---|---|---|
433 | 433 |
struct FsMount *mount; |
434 | 434 |
Error *local_err = NULL; |
435 | 435 |
int fd; |
436 |
char err_msg[512]; |
|
437 | 436 |
|
438 | 437 |
slog("guest-fsfreeze called"); |
439 | 438 |
|
... | ... | |
450 | 449 |
QTAILQ_FOREACH(mount, &mounts, next) { |
451 | 450 |
fd = qemu_open(mount->dirname, O_RDONLY); |
452 | 451 |
if (fd == -1) { |
453 |
sprintf(err_msg, "failed to open %s, %s", mount->dirname, |
|
454 |
strerror(errno)); |
|
455 |
error_set(err, QERR_QGA_COMMAND_FAILED, err_msg); |
|
452 |
error_setg_errno(err, errno, "failed to open %s", mount->dirname); |
|
456 | 453 |
goto error; |
457 | 454 |
} |
458 | 455 |
|
... | ... | |
468 | 465 |
ret = ioctl(fd, FIFREEZE); |
469 | 466 |
if (ret == -1) { |
470 | 467 |
if (errno != EOPNOTSUPP) { |
471 |
sprintf(err_msg, "failed to freeze %s, %s", |
|
472 |
mount->dirname, strerror(errno)); |
|
473 |
error_set(err, QERR_QGA_COMMAND_FAILED, err_msg); |
|
468 |
error_setg_errno(err, errno, "failed to freeze %s", |
|
469 |
mount->dirname); |
|
474 | 470 |
close(fd); |
475 | 471 |
goto error; |
476 | 472 |
} |
Also available in: Unified diff