mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-12-03 23:14:53 +08:00
Rename blkid_get_devname() to blkid_get_dev(), and blkid_get_token()
to blkid_get_devname().
This commit is contained in:
parent
bc40efd3d0
commit
98999c399d
@ -1,3 +1,10 @@
|
||||
2003-02-16 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* blkid.h, dev.c, devname.c, probe.c, read.c, resolve.c: Rename
|
||||
blkid_get_devname() to blkid_get_dev(). Also rename
|
||||
blkid_get_token() to blkid_get_devname(). This more
|
||||
accurately describes what these functions do.
|
||||
|
||||
2003-02-14 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* blkidP.h, devname.c (blkid_get_devname), read.c (parse_tag),
|
||||
|
@ -30,7 +30,7 @@ typedef struct blkid_struct_tag_iterate *blkid_tag_iterate;
|
||||
typedef struct blkid_struct_dev_iterate *blkid_dev_iterate;
|
||||
|
||||
/*
|
||||
* Flags for blkid_get_devname
|
||||
* Flags for blkid_get_dev
|
||||
*
|
||||
* BLKID_DEV_CREATE Create an empty device structure if not found
|
||||
* in the cache.
|
||||
@ -50,7 +50,7 @@ typedef struct blkid_struct_dev_iterate *blkid_dev_iterate;
|
||||
extern void blkid_put_cache(blkid_cache cache);
|
||||
|
||||
/* dev.c */
|
||||
extern const char *blkid_devname_name(blkid_dev dev);
|
||||
extern const char *blkid_dev_devname(blkid_dev dev);
|
||||
|
||||
extern blkid_dev_iterate blkid_dev_iterate_begin(blkid_cache cache);
|
||||
extern int blkid_dev_next(blkid_dev_iterate iterate, blkid_dev *dev);
|
||||
@ -61,8 +61,8 @@ extern char *blkid_devno_to_devname(dev_t devno);
|
||||
|
||||
/* devname.c */
|
||||
extern int blkid_probe_all(blkid_cache cache);
|
||||
extern blkid_dev blkid_get_devname(blkid_cache cache, const char *devname,
|
||||
int flags);
|
||||
extern blkid_dev blkid_get_dev(blkid_cache cache, const char *devname,
|
||||
int flags);
|
||||
|
||||
/* getsize.c */
|
||||
extern blkid_loff_t blkid_get_dev_size(int fd);
|
||||
@ -73,8 +73,8 @@ int blkid_get_cache(blkid_cache *cache, const char *filename);
|
||||
/* resolve.c */
|
||||
extern char *blkid_get_tagname_devname(blkid_cache cache, const char *tagname,
|
||||
const char *devname);
|
||||
extern char *blkid_get_token(blkid_cache cache, const char *token,
|
||||
const char *value);
|
||||
extern char *blkid_get_devname(blkid_cache cache, const char *token,
|
||||
const char *value);
|
||||
|
||||
/* tag.c */
|
||||
extern blkid_tag_iterate blkid_tag_iterate_begin(blkid_dev dev);
|
||||
|
@ -58,7 +58,7 @@ void blkid_free_dev(blkid_dev dev)
|
||||
/*
|
||||
* Given a blkid device, return its name
|
||||
*/
|
||||
extern const char *blkid_devname_name(blkid_dev dev)
|
||||
extern const char *blkid_dev_devname(blkid_dev dev)
|
||||
{
|
||||
return dev->bid_name;
|
||||
}
|
||||
|
@ -48,8 +48,7 @@
|
||||
* If there is no entry with the specified device name, and the create
|
||||
* flag is set, then create an empty device entry.
|
||||
*/
|
||||
blkid_dev blkid_get_devname(blkid_cache cache, const char *devname,
|
||||
int flags)
|
||||
blkid_dev blkid_get_dev(blkid_cache cache, const char *devname, int flags)
|
||||
{
|
||||
blkid_dev dev = NULL, tmp;
|
||||
struct list_head *p;
|
||||
@ -116,7 +115,7 @@ static void probe_one(blkid_cache cache, const char *ptname,
|
||||
char device[256];
|
||||
|
||||
sprintf(device, "%s/%s", *dir, ptname);
|
||||
if ((dev = blkid_get_devname(cache, device, BLKID_DEV_FIND)) &&
|
||||
if ((dev = blkid_get_dev(cache, device, BLKID_DEV_FIND)) &&
|
||||
dev->bid_devno == devno)
|
||||
goto set_pri;
|
||||
|
||||
@ -130,7 +129,7 @@ static void probe_one(blkid_cache cache, const char *ptname,
|
||||
if (!devname)
|
||||
return;
|
||||
}
|
||||
dev = blkid_get_devname(cache, devname, BLKID_DEV_NORMAL);
|
||||
dev = blkid_get_dev(cache, devname, BLKID_DEV_NORMAL);
|
||||
free(devname);
|
||||
|
||||
set_pri:
|
||||
|
@ -82,7 +82,7 @@ http://www.gnu.org/licenses/licenses.html#LGPL
|
||||
.SH "SEE ALSO"
|
||||
.BR blkid_get_cache (3),
|
||||
.BR blkid_put_cache (3),
|
||||
.BR blkid_get_devname (3),
|
||||
.BR blkid_get_dev (3),
|
||||
.BR blkid_probe_all (3),
|
||||
.BR blkid_free_dev (3),
|
||||
.BR blkid_find_tag_dev (3),
|
||||
|
@ -457,7 +457,7 @@ int main(int argc, char **argv)
|
||||
exit(1);
|
||||
}
|
||||
cache = blkid_new_cache();
|
||||
dev = blkid_get_devname(cache, argv[1], BLKID_DEV_NORMAL);
|
||||
dev = blkid_get_dev(cache, argv[1], BLKID_DEV_NORMAL);
|
||||
if (!dev) {
|
||||
printf("%s: %s has an unsupported type\n", argv[0], argv[1]);
|
||||
return (1);
|
||||
|
@ -220,7 +220,7 @@ static int parse_dev(blkid_cache cache, blkid_dev *dev, char **cp)
|
||||
|
||||
DBG(printf("found dev %s\n", name));
|
||||
|
||||
if (!(*dev = blkid_get_devname(cache, name, BLKID_DEV_CREATE)))
|
||||
if (!(*dev = blkid_get_dev(cache, name, BLKID_DEV_CREATE)))
|
||||
return -BLKID_ERR_MEM;
|
||||
|
||||
free(name);
|
||||
|
@ -44,7 +44,7 @@ char *blkid_get_tagname_devname(blkid_cache cache, const char *tagname,
|
||||
if (!devname)
|
||||
return NULL;
|
||||
|
||||
if ((dev = blkid_get_devname(cache, devname, BLKID_DEV_NORMAL)) &&
|
||||
if ((dev = blkid_get_dev(cache, devname, BLKID_DEV_NORMAL)) &&
|
||||
(found = blkid_find_tag_dev(dev, tagname)))
|
||||
ret = blkid_strdup(found->bit_val);
|
||||
|
||||
@ -60,8 +60,8 @@ char *blkid_get_tagname_devname(blkid_cache cache, const char *tagname,
|
||||
* of the form "NAME=value" and there is no value given, then it is assumed
|
||||
* to be the actual devname and a copy is returned.
|
||||
*/
|
||||
char *blkid_get_token(blkid_cache cache, const char *token,
|
||||
const char *value)
|
||||
char *blkid_get_devname(blkid_cache cache, const char *token,
|
||||
const char *value)
|
||||
{
|
||||
blkid_dev dev;
|
||||
blkid_cache c = cache;
|
||||
@ -93,7 +93,7 @@ char *blkid_get_token(blkid_cache cache, const char *token,
|
||||
if (!dev)
|
||||
goto errout;
|
||||
|
||||
ret = blkid_strdup(blkid_devname_name(dev));
|
||||
ret = blkid_strdup(blkid_dev_devname(dev));
|
||||
|
||||
errout:
|
||||
if (t)
|
||||
@ -130,7 +130,7 @@ int main(int argc, char **argv)
|
||||
printf("%s has tag %s=%s\n", argv[2], argv[1],
|
||||
value ? value : "<missing>");
|
||||
} else {
|
||||
value = blkid_get_token(cache, argv[1], NULL);
|
||||
value = blkid_get_devname(cache, argv[1], NULL);
|
||||
printf("%s has tag %s\n", value ? value : "<none>", argv[1]);
|
||||
}
|
||||
blkid_put_cache(cache);
|
||||
|
@ -1,3 +1,9 @@
|
||||
2003-02-16 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* blkid.c: Update to reflect renaming of blkid_get_devname() to
|
||||
blkid_get_dev(), and blkid_get_token() to
|
||||
blkid_get_devname().
|
||||
|
||||
2003-01-29 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* badblocks.8.in: Fix grammar nit.
|
||||
|
@ -65,7 +65,7 @@ static void print_tags(blkid_dev dev, char *show[], int numtag)
|
||||
continue;
|
||||
}
|
||||
if (first) {
|
||||
printf("%s: ", blkid_devname_name(dev));
|
||||
printf("%s: ", blkid_dev_devname(dev));
|
||||
first = 0;
|
||||
}
|
||||
printf("%s=\"%s\" ", type, value);
|
||||
@ -161,7 +161,7 @@ int main(int argc, char **argv)
|
||||
|
||||
/* Load any additional devices not in the cache */
|
||||
for (i = 0; i < numdev; i++)
|
||||
blkid_get_devname(cache, devices[i], BLKID_DEV_NORMAL);
|
||||
blkid_get_dev(cache, devices[i], BLKID_DEV_NORMAL);
|
||||
|
||||
if ((dev = blkid_find_dev_with_tag(cache, search_type,
|
||||
search_value))) {
|
||||
@ -183,7 +183,7 @@ int main(int argc, char **argv)
|
||||
blkid_dev_iterate_end(iter);
|
||||
/* Add all specified devices to cache (optionally display tags) */
|
||||
} else for (i = 0; i < numdev; i++) {
|
||||
blkid_dev dev = blkid_get_devname(cache, devices[i],
|
||||
blkid_dev dev = blkid_get_dev(cache, devices[i],
|
||||
BLKID_DEV_NORMAL);
|
||||
|
||||
if (dev) {
|
||||
|
Loading…
Reference in New Issue
Block a user