assert(devname);
assert(res);
- if (cache && cache->pr && strcmp(devname, cache->filename)) {
+ if (cache && cache->pr && (!cache->filename ||
+ strcmp(devname, cache->filename))) {
blkid_free_probe(cache->pr);
free(cache->filename);
cache->filename = NULL;
* @ambi: returns TRUE if probing result is ambivalent (optional argument)
* @cache: cache for results or NULL
*
- * Returns: fileststem type or NULL in case of error. The result has to be
+ * Returns: filesystem type or NULL in case of error. The result has to be
* deallocated by free() if @cache is NULL.
*/
char *mnt_get_fstype(const char *devname, int *ambi, mnt_cache *cache)