mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
src/iptables.c: Create directory for saving iptables rules
This commit is contained in:
parent
f90cd4c3f4
commit
3d3c8ac4c4
@ -1,3 +1,7 @@
|
||||
Thu Feb 7 10:16:42 IST 2008 Mark McLoughlin <markmc@redhat.com>
|
||||
|
||||
* src/iptables.c: Create directory for saving iptables rules
|
||||
|
||||
Thu Feb 7 10:12:15 IST 2008 Mark McLoughlin <markmc@redhat.com>
|
||||
|
||||
* src/xm_internal.[ch]: Move static function prototype from header
|
||||
|
@ -238,6 +238,12 @@ iptRulesSave(iptRules *rules)
|
||||
#ifdef ENABLE_IPTABLES_LOKKIT
|
||||
int err;
|
||||
|
||||
if ((err = virFileMakePath(rules->dir))) {
|
||||
qemudLog(QEMUD_WARN, "Failed to create directory %s : %s",
|
||||
rules->dir, strerror(err));
|
||||
return;
|
||||
}
|
||||
|
||||
if ((err = writeRules(rules->path, rules->rules, rules->nrules))) {
|
||||
qemudLog(QEMUD_WARN, "Failed to saves iptables rules to %s : %s",
|
||||
rules->path, strerror(err));
|
||||
|
Loading…
Reference in New Issue
Block a user