From 0ed0f028e849509fe892cd7061617f8ad5eb3dff Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sat, 2 Aug 2003 22:02:03 +0000 Subject: 2003-08-02 Ognyan Kulev * module.c (store_module_open): NAME that doesn't contain ':' is not considered invalid argument, but a class name without class-specific portion. * typed.c (store_typed_open): When NAME is empty string, don't invoke store_open (name + 1, ...). --- libstore/ChangeLog | 8 ++++++++ libstore/module.c | 7 ++----- libstore/typed.c | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/libstore/ChangeLog b/libstore/ChangeLog index bf2fa368..35d57ca8 100644 --- a/libstore/ChangeLog +++ b/libstore/ChangeLog @@ -1,3 +1,11 @@ +2003-08-02 Ognyan Kulev + + * module.c (store_module_open): NAME that doesn't contain ':' is + not considered invalid argument, but a class name without + class-specific portion. + * typed.c (store_typed_open): When NAME is empty string, don't + invoke store_open (name + 1, ...). + 2002-10-01 Ludovic Courtès * store.h: New type store_set_size_meth_t: New type. New diff --git a/libstore/module.c b/libstore/module.c index 1fcdf544..6e75099a 100644 --- a/libstore/module.c +++ b/libstore/module.c @@ -1,5 +1,5 @@ /* Dynamic loading of store class modules - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -97,12 +97,9 @@ store_module_open (const char *name, int flags, struct store **store) { const struct store_class *cl; - const char *clname_end = strchr (name, ':'); + const char *clname_end = strchrnul (name, ':'); error_t err; - if (! clname_end) - return EINVAL; - err = open_class (1, name, clname_end, &cl); if (err) return err; diff --git a/libstore/typed.c b/libstore/typed.c index 822f23f8..42b27bd5 100644 --- a/libstore/typed.c +++ b/libstore/typed.c @@ -1,6 +1,6 @@ /* Support for opening `typed' stores - Copyright (C) 1997,98,2001,02 Free Software Foundation, Inc. + Copyright (C) 1997,98,2001,02,03 Free Software Foundation, Inc. Written by Miles Bader This file is part of the GNU Hurd. @@ -113,7 +113,7 @@ store_typed_open (const char *name, int flags, const struct store_class *cl; const char *clname_end = strchrnul (name, ':'); - if (clname_end == name) + if (clname_end == name && *clname_end) /* Open NAME with store_open. */ return store_open (name + 1, flags, classes, store); -- cgit v1.2.3