1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

227 Commits

Author SHA1 Message Date
Dave Wysochanski
5f1c57d008 Restore umask when device node creation fails.
Author: Florian Zumbiehl <florz@florz.de>
Acked-by: Dave Wysochanski <dwysocha@redhat.com>
2009-09-03 21:51:26 +00:00
Peter Rajnoha
f9ff23dffe Add 'udevcomplete_all' command for dmsetup. Export DM_COOKIE_MAGIC in libdevmapper.h. 2009-08-06 15:04:30 +00:00
Peter Rajnoha
1879e85672 Detect udev problems in _rename_dev_node. 2009-08-06 15:00:25 +00:00
Alasdair Kergon
fa5617d7f5 Additional logging 2009-08-05 19:50:08 +00:00
Alasdair Kergon
f9e17e36aa Add udev checks. 2009-08-03 18:33:08 +00:00
Alasdair Kergon
a74be32bf6 Manage without dm_udev_cleanup? 2009-08-03 18:01:45 +00:00
Alasdair Kergon
f86117e3d5 cleanup some ignored return values & 'stack's 2009-08-03 11:20:15 +00:00
Alasdair Kergon
b59c9854e8 deal with error-related FIXMEs 2009-08-03 11:01:26 +00:00
Alasdair Kergon
2c0dfdf839 Add udevcomplete and --noudevwait to dmsetup. 2009-07-31 17:51:45 +00:00
Alasdair Kergon
b634751cc4 another fixme 2009-07-31 16:57:06 +00:00
Alasdair Kergon
4d8c4ea7e6 Add libdevmapper functions to support synchronisation with udev. 2009-07-31 15:53:11 +00:00
Alasdair Kergon
a9cb6969b0 Add dm_log_with_errno and dm_log_with_errno_init, deprecating the old
Change plog to use dm_log_with_errno unless deprecated dm_log_init was used.
Rename plog macro to LOG_LINE and use in dm_dump_memory_debug.
2009-07-10 09:59:37 +00:00
Milan Broz
6391d03f54 Fix backward compatibility for major:minor query.
Is an application uses query and set major:minor
to device, it should not fallback to default major by default.

Add new function whoich allows that (and use it in lvm2).
2009-06-17 20:55:24 +00:00
Peter Rajnoha
c48e40391b Add checks for device names in dmsetup and show proper error messages.
Checks added for DM device names to allow only names < DM_NAME_LEN,
otherwise a part of lengthy name would be silently ignored and could
cause confusion while using dmsetup. Also, the name should not contain
'/' character, if it is used in context of creating a new device
or renaming the existing one (because we do not consider full path
to devices, they do not exist in filesystem yet) and appropriate error
messages are shown.
2009-01-07 12:17:40 +00:00
Alasdair Kergon
56d8844068 more fixes 2008-11-04 15:07:45 +00:00
Alasdair Kergon
2c44337bd5 Right, a simple build (without options) is working again. 2008-11-03 22:14:30 +00:00
Alasdair Kergon
3e5b6ed214 more tweaking to get things to compile - dmlib.h for log fns, list.h 2008-11-03 18:59:59 +00:00
Alasdair Kergon
0782ad5002 further progress 2008-11-01 02:19:19 +00:00
Alasdair Kergon
2bd5b63f4a rename some config vars 2008-06-06 20:44:35 +00:00
Alasdair Kergon
fc795d8701 more readahead node fixes/debug messages 2007-12-14 19:49:27 +00:00
Alasdair Kergon
4a41a93a7a Add node operation stack debug messages. 2007-12-14 17:26:09 +00:00
Alasdair Kergon
3a2234162d Report error when empty device name passed to readahead functions. 2007-12-13 02:25:45 +00:00
Alasdair Kergon
de4ddace2e Fix minimum readahead debug message. 2007-12-05 18:57:34 +00:00
Alasdair Kergon
fec8f8382a fix ioctls to use long not int
update dm-ioctl.h after compat tidy-up
2007-12-05 14:11:26 +00:00
Alasdair Kergon
0b7d16bc09 fixes 2007-12-03 22:48:36 +00:00
Alasdair Kergon
15d2547427 missing #include 2007-12-03 17:56:36 +00:00
Alasdair Kergon
1d4e9f245b fix 2007-11-30 16:44:42 +00:00
Alasdair Kergon
e81af2f3fe readahead support completed - untested 2007-11-30 16:42:26 +00:00
Alasdair Kergon
2d1eead2e8 read_ahead node ops 2007-11-30 14:59:57 +00:00
Alasdair Kergon
52b8440916 add read_ahead functions to library and dmsetup --readahead
(Not live yet.)
2007-11-27 20:57:05 +00:00
Jim Meyering
06b8fee542 Allow $DM_DEV_DIR envvar to override default of "/dev".
* dmsetup/dmsetup.c (DEV_PATH): Remove definition.
(parse_loop_device_name): Add parameter: dev_dir.
Declare the "dev" parameter to be "const".
Use dev_dir, not DEV_PATH.  Handle the case in which dev_dir
does not end in a "/".
(_get_abspath): Declare "path" parameter "const", to match.
(_process_losetup_switches): Add parameter: dev_dir.
Pass dev_dir to parse_loop_device_name.
(_process_switches): Add parameter: dev_dir.
Pass dev_dir to _process_losetup_switches.
(main): Set dev_dir from the DM_DEV_DIR envvar, else to "/dev".
Call dm_set_dev_dir.
* lib/libdm-common.c (dm_set_dev_dir): Rewrite to be careful
about boundary conditions, now that dev_dir may be tainted.
* man/dmsetup.8: Mention $DM_DEV_DIR.


Author: Jim Meyering <meyering@redhat.com>
2007-10-09 12:14:48 +00:00
Alasdair Kergon
147d5faccf Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-21 16:26:07 +00:00
Jim Meyering
87518d850b Introduce log_sys_* macros from LVM2.
Convert existing "<string>: <function> failed: <strerror>" type messages
to use this macro.  Patch by Jun'ichi Nomura.
2007-07-28 10:23:02 +00:00
Petr Rockai
ba117ad80e Make warnings go to stderr. Adds log_warn macro for that purpose,
log_print continues to print to stdout.
2007-06-28 17:27:02 +00:00
Alasdair Kergon
4dcaa2300c Add dm_event_handler_[gs]et_timeout functions.
Streamline dm_report_field_* interface.
2007-01-22 15:03:57 +00:00
Alasdair Kergon
7dc850db3e coverity fixes 2006-05-10 16:23:41 +00:00
Alasdair Kergon
6ef080af04 A setgeometry implementation. [untested] 2006-02-20 23:55:58 +00:00
Alasdair Kergon
b5d8ff1014 Add exported functions to set uid, gid and mode. [Bastian Blank] 2006-02-03 14:23:22 +00:00
Alasdair Kergon
5e3bd86778 Rename _log to dm_log and export.
Fix misc compile-time warnings.
2006-01-31 14:50:38 +00:00
Alasdair Kergon
3aeb569036 Export dm_set_selinux_context. 2005-10-25 17:30:00 +00:00
Alasdair Kergon
a38bf76bab Tidy some log mesgs. 2005-10-18 13:07:41 +00:00
Alasdair Kergon
ffc88f2eeb dm_driver_version 2005-10-17 18:05:39 +00:00
Alasdair Kergon
a3f6b2ce79 export bitset, pool, hash, malloc 2005-10-16 22:57:20 +00:00
Alasdair Kergon
3d0480ed27 Code to build and display device dependency tree. 2005-10-16 14:33:22 +00:00
Alasdair Kergon
d54d93ab2e Explicitly initialise no_open_count 2005-09-20 16:39:12 +00:00
Alasdair Kergon
c8c07bbedc Use matchpathcon mode parameter 2005-06-13 13:11:48 +00:00
AJ Lewis
c71d140252 o print the context along with the path when setting selinux context 2005-06-10 21:30:21 +00:00
Alasdair Kergon
3d2aecf0ae Add option to compile without ioctl for testing. 2005-01-27 16:16:54 +00:00
Alasdair Kergon
f34c169a1b Attempt to fix /dev/mapper/control transparently if it's wrong. 2005-01-06 18:22:44 +00:00
Alasdair Kergon
6b70629cc9 Configuration-time option for setting uid/gid/mode for /dev/mapper nodes. 2005-01-05 22:00:40 +00:00
Alasdair Kergon
2d7f9f0b39 printf->fprintf 2004-10-01 19:07:41 +00:00
Alasdair Kergon
2f7b799f89 set_selinux_context() return code fix 2004-07-03 18:14:12 +00:00
Alasdair Kergon
8bad033938 Fix device number handling for 2.6 kernels. 2004-07-01 15:14:29 +00:00
Alasdair Kergon
121c5c060b Ignore error setting selinux file context if fs doesn't support it. 2004-04-16 12:24:46 +00:00
Alasdair Kergon
1aa08175ac add some selinux support 2004-04-06 18:54:00 +00:00
Alasdair Kergon
8b67f40de2 Update copyright messages. 2004-03-30 19:08:57 +00:00
Alasdair Kergon
ec36089afd Extract log.h and tweak funcs to be like lvm2 ones. 2004-02-24 18:50:09 +00:00
Alasdair Kergon
1f86c3397e Option to revert to default logging function after using a custom one. 2003-12-21 16:08:20 +00:00
Alasdair Kergon
d71bfabe39 Support for v4 interface 2003-07-01 21:20:58 +00:00
Alasdair Kergon
12428fceee Allow device major to be set too. 2003-04-02 19:03:00 +00:00
Alasdair Kergon
39662e362a Allow optional verbose logging 2003-01-21 21:25:11 +00:00
Alasdair Kergon
34917a5373 Only functions listed in libdevmapper.h should get exported. 2002-11-14 19:26:28 +00:00
Alasdair Kergon
40c44db720 Fix includes after DM_DIR definition move. 2002-11-14 14:44:42 +00:00
Alasdair Kergon
671b6aa602 Commit snapshot-related changes preparing for the next beta release. 2002-04-23 21:47:50 +00:00
Patrick Caulfield
63def4e716 Rename device node during a DM_RENAME command. 2002-04-11 12:45:18 +00:00
Alasdair Kergon
158510ad42 Improve log messages. 2002-03-20 14:34:15 +00:00
Alasdair Kergon
902098d615 Support device queries by uuid as well as by name. (Used by lvrename.) 2002-03-18 23:39:42 +00:00
Alasdair Kergon
c22c93f0b6 Suppress verbose/debug messages from libdevmapper. 2002-03-14 13:39:33 +00:00
Alasdair Kergon
b2de0b7d44 dmsetup display uuid 2002-03-13 16:19:17 +00:00
Alasdair Kergon
ad21a5585c Let dmsetup store the uuid on device creation. 2002-03-11 22:44:36 +00:00
Alasdair Kergon
2cf9604929 Use same log levels as LVM2. 2002-01-18 19:37:26 +00:00
Alasdair Kergon
444b7d2360 Add function that returns the library version. 2002-01-17 14:13:25 +00:00
Alasdair Kergon
00ee56e232 Use additional version numbers.
Kernel driver has a version number (stored in kernel/VERSION).
  The first two components of this (0.94) give the version number of the
  ioctl interface.  This number must be changed whenever a change is
  made to the ioctl interface that breaks backwards compatibility.

  The library has a version number (stored in VERSION) which is
  used for linking.
  The first and/or second component of this must be changed whenever
  a change is made to the library API that breaks backwards
  compatibility.
2002-01-17 13:19:55 +00:00
Alasdair Kergon
1ed34e88aa o Add rename support to dmsetup.
o Add support to use specified minor number to library and dmsetup.
2002-01-11 12:12:46 +00:00
Joe Thornber
f17673f1d0 o Added -r, --read-only switch to dmsetup for use with create and reload. 2002-01-03 10:39:21 +00:00
Alasdair Kergon
df520f1265 o Include dmsetup man page in build
o Allow pathname in dmsetup device arg
o Generated patches for 0.90.02
2001-12-14 13:30:04 +00:00
Alasdair Kergon
638754e559 Various fixes & restructure to extract common code. 2001-12-05 16:41:52 +00:00