* [PATCH 3/3] Use global libudev context in _set_udev_checking fn
@ 2011-03-21 14:46 Peter Rajnoha
2011-03-21 15:48 ` Milan Broz
0 siblings, 1 reply; 2+ messages in thread
From: Peter Rajnoha @ 2011-03-21 14:46 UTC (permalink / raw)
To: lvm-devel
This is just a little cleanup - we use global libudev reference now,
so there's no need to call udev_new even in existing code. Udev library
reference is initialized at LVM2 start and finalized at its end
(see previous patch).
Peter
---
tools/lvmcmdline.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index efe7f4e..aef9bf8 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -960,7 +960,7 @@ static int _set_udev_checking(struct cmd_context *cmd)
size_t udev_dev_dir_len;
int dirs_diff;
- if (!(udev = udev_new()) ||
+ if (!(udev = udev_get_library_context()) ||
!(udev_dev_dir = udev_get_dev_path(udev)) ||
!*udev_dev_dir) {
log_error("Could not get udev dev path.");
@@ -988,7 +988,6 @@ static int _set_udev_checking(struct cmd_context *cmd)
init_udev_checking(0);
}
- udev_unref(udev);
#endif
return 1;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 3/3] Use global libudev context in _set_udev_checking fn
2011-03-21 14:46 [PATCH 3/3] Use global libudev context in _set_udev_checking fn Peter Rajnoha
@ 2011-03-21 15:48 ` Milan Broz
0 siblings, 0 replies; 2+ messages in thread
From: Milan Broz @ 2011-03-21 15:48 UTC (permalink / raw)
To: lvm-devel
On 03/21/2011 03:46 PM, Peter Rajnoha wrote:
> This is just a little cleanup - we use global libudev reference now,
> so there's no need to call udev_new even in existing code. Udev library
> reference is initialized at LVM2 start and finalized at its end
> (see previous patch).
ack
Milan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-21 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-21 14:46 [PATCH 3/3] Use global libudev context in _set_udev_checking fn Peter Rajnoha
2011-03-21 15:48 ` Milan Broz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.