readahead-common.c revision 22be093ffb403a1c474037939ca9b88b1ee39f77
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2010 Lennart Poettering
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <errno.h>
#include <libudev.h>
#include <stdlib.h>
#include <string.h>
#include "log.h"
#include "readahead-common.h"
#include "util.h"
return -errno;
}
return 0;
}
return 0;
}
return 1;
}
int fs_on_ssd(const char *p) {
bool b = false;
assert(p);
return -errno;
return -ENOMEM;
goto finish;
else
if (!look_at)
goto finish;
/* First, try high-level property */
goto finish;
}
/* Second, try kernel attribute */
goto finish;
/* Finally, fallback to heuristics */
goto finish;
if (udev_device)
if (udev)
return b;
}