Overview
Comment: | Updated to work if "-c 0" is used to disable file descriptor caching |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
6b9ca2c468e71641a750540960824cd8 |
User & Date: | rkeene on 2016-05-20 16:00:01 |
Other Links: | manifest | tags |
Context
2016-08-09
| ||
16:51 | Disabled -Werror, it is a bad idea for releases to include check-in: 1a822c0ca5 user: rkeene tags: trunk | |
2016-05-20
| ||
16:00 | Updated to work if "-c 0" is used to disable file descriptor caching check-in: 6b9ca2c468 user: rkeene tags: trunk | |
15:52 | Added a simple way to pass additional CFLAGS/LDFLAGS/LIBS check-in: 6d0a708452 user: rkeene tags: trunk | |
Changes
Modified filed.c from [07cd352593] to [7391155930].
︙ | |||
263 264 265 266 267 268 269 270 271 272 273 274 275 276 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | + + + + + | unsigned int idx; int mutex_init_ret; /* Cache may not be re-initialized */ if (filed_fileinfo_fdcache_size != 0 || filed_fileinfo_fdcache != NULL) { return(1); } /* Cache does not need to be allocated if cache is not enabled */ if (cache_size == 0) { return(0); } /* Allocate cache */ filed_fileinfo_fdcache_size = cache_size; filed_fileinfo_fdcache = malloc(sizeof(*filed_fileinfo_fdcache) * filed_fileinfo_fdcache_size); if (filed_fileinfo_fdcache == NULL) { return(1); } |
︙ | |||
865 866 867 868 869 870 871 | 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 | + - + - + - + - + - + + + + + + + + - + + | /* Open a file and return file information */ static struct filed_fileinfo *filed_open_file(const char *path, struct filed_fileinfo *buffer) { struct filed_fileinfo *cache; unsigned int cache_idx; off_t len; int fd; if (filed_fileinfo_fdcache_size != 0) { |
︙ | |||
904 905 906 907 908 909 910 | 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 | + - - - - - - - + + + + + + + - - + + - - - - - - + + + + + + - + + | /* XXX:TODO: Determine */ cache->lastmod = filed_format_time(cache->lastmod_b, sizeof(cache->lastmod_b), time(NULL) - 30); } else { filed_log_msg_debug("Cache hit for idx: %lu: PATH \"%s\"", (unsigned long) cache_idx, path); } if (filed_fileinfo_fdcache_size != 0) { |
︙ |