]> git.ipfire.org Git - thirdparty/util-linux.git/blame - include/canonicalize.h
scriptreplay: add --summary
[thirdparty/util-linux.git] / include / canonicalize.h
CommitLineData
0f23ee0c
KZ
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU Library Public License as published by
4 * the Free Software Foundation; either version 2, or (at your option)
5 * any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU Library Public License for more details.
11 */
74a9c6f7
KZ
12#ifndef CANONICALIZE_H
13#define CANONICALIZE_H
14
45bda5c8 15#include "c.h" /* for PATH_MAX */
2238214d 16#include "strutils.h"
74a9c6f7
KZ
17
18extern char *canonicalize_path(const char *path);
33c5fd0c 19extern char *canonicalize_path_restricted(const char *path);
a992137b 20extern char *canonicalize_dm_name(const char *ptname);
5a89aa99 21extern char *__canonicalize_dm_name(const char *prefix, const char *ptname);
74a9c6f7 22
2238214d
KZ
23extern char *absolute_path(const char *path);
24
25static inline int is_relative_path(const char *path)
26{
27 if (!path || *path == '/')
28 return 0;
29 return 1;
30}
31
74a9c6f7 32#endif /* CANONICALIZE_H */