]> sourceware.org Git - lvm2.git/commitdiff
missing dm_snprintf
authorAlasdair Kergon <agk@redhat.com>
Fri, 25 Sep 2009 19:06:05 +0000 (19:06 +0000)
committerAlasdair Kergon <agk@redhat.com>
Fri, 25 Sep 2009 19:06:05 +0000 (19:06 +0000)
libdm/libdm-common.c

index c985ad7851c252fdb61e2a5f85c02c3acb2ede6a..175d8d1d91c2ada7239b6536cb02b25359078b72 100644 (file)
@@ -261,7 +261,11 @@ int dm_task_set_name(struct dm_task *dmt, const char *name)
                 * under /dev/mapper, use that name directly.  Otherwise call
                 * _find_dm_name_of_device() to scan _dm_dir for a match.
                 */
-               snprintf(path, sizeof(path), "%s/%s", _dm_dir, pos + 1);
+               if (dm_snprintf(path, sizeof(path), "%s/%s", _dm_dir,
+                               pos + 1) == -1) {
+                       log_error("Couldn't create path for %s", pos + 1);
+                       return 0;
+               }
 
                if (!stat(path, &st2) && (st1.st_rdev == st2.st_rdev))
                        name = pos + 1;
This page took 0.037954 seconds and 5 git commands to generate.