1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-02 13:47:42 +03:00

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.
This commit is contained in:
Alasdair Kergon 2002-01-17 13:19:55 +00:00
parent c46d20fa92
commit ee11aa9e75
3 changed files with 6 additions and 6 deletions

View File

@ -20,8 +20,8 @@ include ../make.tmpl
install: @interface@/libdevmapper.so
$(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 555 $(STRIP) $< \
$(libdir)/libdevmapper.so.$(VERSION)
$(LN_S) -f libdevmapper.so.$(VERSION) $(libdir)/libdevmapper.so
$(libdir)/libdevmapper.so.$(LIB_VERSION)
$(LN_S) -f libdevmapper.so.$(LIB_VERSION) $(libdir)/libdevmapper.so
$(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 444 libdevmapper.h \
$(includedir)/libdevmapper.h
@ -34,7 +34,7 @@ ioctl/libdevmapper.o: ioctl_version
ioctl_version: ioctl/libdevmapper.c
@echo Checking library version compatible with kernel version in dm-ioctl.h
test "$(VERSION)" = \
test "$(IOCTL_VERSION)" = \
"$(shell $(CC) -E -dM $(INCLUDES) $(CFLAGS) \
ioctl/libdevmapper.c | \
awk -F '[ \t\"]+' '/DM_IOCTL_VERSION/ {print $$3}' )"

View File

@ -55,7 +55,7 @@ void _build_dev_path(char *buffer, size_t len, const char *dev_name)
if (strchr(dev_name, '/'))
snprintf(buffer, len, "%s", dev_name);
else
snprintf(buffer, len, "/dev/%s/%s", DM_DIR, dev_name);
snprintf(buffer, len, "%s/%s", _dm_dir, dev_name);
}
struct dm_task *dm_task_create(int type)
@ -87,7 +87,7 @@ int dm_task_set_name(struct dm_task *dmt, const char *name)
* as its last component.
*/
if ((pos = strrchr(name, '/'))) {
snprintf(path, sizeof(path), "/dev/%s/%s", DM_DIR, pos + 1);
snprintf(path, sizeof(path), "%s/%s", _dm_dir, pos + 1);
if (stat(name, &st1) || stat(path, &st2) ||
!(st1.st_dev == st2.st_dev)) {

View File

@ -160,7 +160,7 @@ static int _version(int argc, char **argv)
{
int r = 0;
struct dm_task *dmt;
char version[16];
char version[80];
if (!(dmt = dm_task_create(DM_DEVICE_VERSION)))
return 0;