Hello community,
here is the log from the commit of package device-mapper
checked in at Wed Aug 16 14:19:49 CEST 2006.
--------
--- device-mapper/device-mapper.changes 2006-07-26 16:38:36.000000000 +0200
+++ device-mapper/device-mapper.changes 2006-08-16 13:17:39.000000000 +0200
@@ -1,0 +2,8 @@
+Wed Aug 16 13:15:28 CEST 2006 - fehr@suse.de
+
+- update to new version 1.02.09
+ Add --table argument to dmsetup for a one-line table.
+ Abort if errors are found during cmdline option processing.
+ Add lockfs indicator to debug output.
+
+-------------------------------------------------------------------
Old:
----
device-mapper.1.02.08.tar.bz2
New:
----
device-mapper.1.02.09.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ device-mapper.spec ++++++
--- /var/tmp/diff_new_pack.jifvRE/_old 2006-08-16 14:19:03.000000000 +0200
+++ /var/tmp/diff_new_pack.jifvRE/_new 2006-08-16 14:19:03.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package device-mapper (Version 1.02.08)
+# spec file for package device-mapper (Version 1.02.09)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,7 +13,7 @@
License: GPL, LGPL
Group: System/Base
Autoreqprov: on
-Version: 1.02.08
+Version: 1.02.09
Release: 1
Summary: Device Mapper Tools
Source: device-mapper.%{version}.tar.bz2
@@ -68,6 +68,11 @@
%{_mandir}/man8/dmsetup.8.gz
%changelog -n device-mapper
+* Wed Aug 16 2006 - fehr@suse.de
+- update to new version 1.02.09
+ Add --table argument to dmsetup for a one-line table.
+ Abort if errors are found during cmdline option processing.
+ Add lockfs indicator to debug output.
* Wed Jul 26 2006 - fehr@suse.de
- update to new version 1.02.08
Update dmsetup man page.
++++++ device-mapper.1.02.08.tar.bz2 -> device-mapper.1.02.09.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.08/VERSION new/device-mapper.1.02.09/VERSION
--- old/device-mapper.1.02.08/VERSION 2006-07-17 16:26:36.000000000 +0200
+++ new/device-mapper.1.02.09/VERSION 2006-08-15 19:39:22.000000000 +0200
@@ -1 +1 @@
-1.02.08 (2006-07-17)
+1.02.09 (2006-08-15)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.08/WHATS_NEW new/device-mapper.1.02.09/WHATS_NEW
--- old/device-mapper.1.02.08/WHATS_NEW 2006-07-17 16:13:23.000000000 +0200
+++ new/device-mapper.1.02.09/WHATS_NEW 2006-08-15 19:38:38.000000000 +0200
@@ -1,3 +1,9 @@
+Version 1.02.09 - 15 Aug 2006
+==============================
+ Add --table argument to dmsetup for a one-line table.
+ Abort if errors are found during cmdline option processing.
+ Add lockfs indicator to debug output.
+
Version 1.02.08 - 17 July 2006
==============================
Append full patch to check in emails.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.08/dmsetup/dmsetup.c new/device-mapper.1.02.09/dmsetup/dmsetup.c
--- old/device-mapper.1.02.08/dmsetup/dmsetup.c 2006-06-18 13:51:46.000000000 +0200
+++ new/device-mapper.1.02.09/dmsetup/dmsetup.c 2006-08-10 22:53:21.000000000 +0200
@@ -98,6 +98,7 @@
NOOPENCOUNT_ARG,
NOTABLE_ARG,
OPTIONS_ARG,
+ TABLE_ARG,
TARGET_ARG,
TREE_ARG,
UID_ARG,
@@ -112,6 +113,7 @@
static int _num_devices;
static char *_uuid;
static char *_fields;
+static char *_table;
static char *_target;
static char *_command;
static struct dm_tree *_dtree;
@@ -119,17 +121,55 @@
/*
* Commands
*/
+static int _parse_line(struct dm_task *dmt, char *buffer, const char *file,
+ int line)
+{
+ char ttype[LINE_SIZE], *ptr, *comment;
+ unsigned long long start, size;
+ int n;
+
+ /* trim trailing space */
+ for (ptr = buffer + strlen(buffer) - 1; ptr >= buffer; ptr--)
+ if (!isspace((int) *ptr))
+ break;
+ ptr++;
+ *ptr = '\0';
+
+ /* trim leading space */
+ for (ptr = buffer; *ptr && isspace((int) *ptr); ptr++)
+ ;
+
+ if (!*ptr || *ptr == '#')
+ return 1;
+
+ if (sscanf(ptr, "%llu %llu %s %n",
+ &start, &size, ttype, &n) < 3) {
+ err("Invalid format on line %d of table %s", line, file);
+ return 0;
+ }
+
+ ptr += n;
+ if ((comment = strchr(ptr, (int) '#')))
+ *comment = '\0';
+
+ if (!dm_task_add_target(dmt, start, size, ttype, ptr))
+ return 0;
+
+ return 1;
+}
+
static int _parse_file(struct dm_task *dmt, const char *file)
{
char *buffer = NULL;
size_t buffer_size = 0;
- char ttype[LINE_SIZE], *ptr, *comment;
FILE *fp;
- unsigned long long start, size;
- int r = 0, n, line = 0;
+ int r = 0, line = 0;
- /* OK for empty stdin */
+ /* one-line table on cmdline */
+ if (_table)
+ return _parse_line(dmt, _table, "", ++line);
+ /* OK for empty stdin */
if (file) {
if (!(fp = fopen(file, "r"))) {
err("Couldn't open '%s' for reading", file);
@@ -145,38 +185,13 @@
return 0;
}
- while (fgets(buffer, (int) buffer_size, fp)) {
+ while (fgets(buffer, (int) buffer_size, fp))
#else
- while (getline(&buffer, &buffer_size, fp) > 0) {
+ while (getline(&buffer, &buffer_size, fp) > 0)
#endif
- line++;
-
- /* trim trailing space */
- for (ptr = buffer + strlen(buffer) - 1; ptr >= buffer; ptr--)
- if (!isspace((int) *ptr))
- break;
- ptr++;
- *ptr = '\0';
-
- /* trim leading space */
- for (ptr = buffer; *ptr && isspace((int) *ptr); ptr++) ;
-
- if (!*ptr || *ptr == '#')
- continue;
-
- if (sscanf(ptr, "%llu %llu %s %n",
- &start, &size, ttype, &n) < 3) {
- err("%s:%d Invalid format", file, line);
+ if (!_parse_line(dmt, buffer, file ? : "on stdin", ++line))
goto out;
- }
-
- ptr += n;
- if ((comment = strchr(ptr, (int) '#')))
- *comment = '\0';
- if (!dm_task_add_target(dmt, start, size, ttype, ptr))
- goto out;
- }
r = 1;
out:
@@ -725,23 +740,23 @@
size = _get_device_size(name);
- if (!(dmt = dm_task_create(DM_DEVICE_RELOAD)))
- return 0;
+ if (!(dmt = dm_task_create(DM_DEVICE_RELOAD)))
+ return 0;
if (!_set_task_device(dmt, name, 0))
goto err;
- if (!dm_task_add_target(dmt, 0, size, "error", ""))
+ if (!dm_task_add_target(dmt, 0, size, "error", ""))
goto err;
- if (_switches[READ_ONLY] && !dm_task_set_ro(dmt))
- goto err;
+ if (_switches[READ_ONLY] && !dm_task_set_ro(dmt))
+ goto err;
- if (_switches[NOOPENCOUNT_ARG] && !dm_task_no_open_count(dmt))
- goto err;
+ if (_switches[NOOPENCOUNT_ARG] && !dm_task_no_open_count(dmt))
+ goto err;
- if (!dm_task_run(dmt))
- goto err;
+ if (!dm_task_run(dmt))
+ goto err;
if (!_simple(DM_DEVICE_RESUME, name, 0, 0)) {
_simple(DM_DEVICE_CLEAR, name, 0, 0);
@@ -1472,7 +1487,8 @@
static struct command _commands[] = {
{"create", "
participants (1)
-
root@suse.de