diff --git a/lib/filters/filter-persistent.c b/lib/filters/filter-persistent.c index 78716f6eb..fcdc26c9c 100644 --- a/lib/filters/filter-persistent.c +++ b/lib/filters/filter-persistent.c @@ -140,13 +140,13 @@ int persistent_filter_dump(struct dev_filter *f) { struct pfilter *pf = (struct pfilter *) f->private; - FILE *fp = fopen(pf->file, "w"); - + FILE *fp; + log_very_verbose("Dumping persistent device cache to %s", pf->file); + fp = fopen(pf->file, "w"); if (!fp) { - log_error("Couldn't open '%s' for to hold valid devices.", - pf->file); + log_sys_error("fopen", pf->file); return 0; } diff --git a/make.tmpl.in b/make.tmpl.in index b99cec6e0..acc063fd1 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -50,11 +50,15 @@ endif SUFFIXES= SUFFIXES=.c .d .o -CFLAGS+=-g -Wall +CFLAGS+=-Wall +CFLAGS+=-O2 +CFLAGS+=-g -fno-omit-frame-pointer +#CFLAGS+=-pg CFLAGS+=-DDEBUG_MEM -DDEBUG #CFLAGS+=-DBOUNDS_CHECK INCLUDES+=-I. -I$(top_srcdir)/include INC_LNS=$(top_srcdir)/include/.symlinks_created +LD_FLAGS=-pg ifeq ("@READLINE@", "yes") CFLAGS += -DREADLINE_SUPPORT diff --git a/tools/Makefile.in b/tools/Makefile.in index c1683f741..f88b8bf70 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -43,7 +43,8 @@ TARGETS=\ include ../make.tmpl lvm: $(OBJECTS) $(top_srcdir)/lib/liblvm.a - $(CC) -o lvm $(OBJECTS) -L$(top_srcdir)/lib -llvm $(EXTRA_LIBS) + $(CC) -o lvm $(OBJECTS) $(LD_FLAGS) -L$(top_srcdir)/lib -llvm \ + $(EXTRA_LIBS) install: $(INSTALL) -c -d $(sbindir);