diff options
author | Jerome Guitton <guitton@adacore.com> | 2004-06-17 11:47:51 +0000 |
---|---|---|
committer | Jerome Guitton <guitton@adacore.com> | 2004-06-17 11:47:51 +0000 |
commit | 077b044d629319cd721afa87329f6dd93f6570e2 (patch) | |
tree | 7bdbb1a605d3e5a3d9dd24a9f5d2d86b4acbe67b /bfd/cache.c | |
parent | 1ab3b40721317de0576ee6385defe48d3ebfc058 (diff) | |
download | binutils-redhat-077b044d629319cd721afa87329f6dd93f6570e2.tar.gz |
* bfd-in.h (bfd_cache_close_all): New function declaration.
* bfd-in2.h: Regenerate.
* cache.c (bfd_cache_close_all): New function definition.
Diffstat (limited to 'bfd/cache.c')
-rw-r--r-- | bfd/cache.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bfd/cache.c b/bfd/cache.c index 58eda916bb..63d4d786ae 100644 --- a/bfd/cache.c +++ b/bfd/cache.c @@ -344,6 +344,31 @@ bfd_cache_close (bfd *abfd) } /* +FUNCTION + bfd_cache_close_all + +SYNOPSIS + bfd_boolean bfd_cache_close_all (void); + +DESCRIPTION + Remove all BFDs from the cache. If the attached file is open, + then close it too. + +RETURNS + <<FALSE>> is returned if closing one of the file fails, <<TRUE>> is + returned if all is well. +*/ + +bfd_boolean +bfd_cache_close_all () +{ + bfd_boolean ret = TRUE; + + while (bfd_last_cache != NULL) + ret &= bfd_cache_close (bfd_last_cache); +} + +/* INTERNAL_FUNCTION bfd_open_file |