mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 23:09:29 +02:00
seq_file: rename mangle_path to seq_mangle_path
The symbol mangle_path conflicts with a gcov symbol which can break the build of ARCH=um with gcov, and it's also not very specific and descriptive. Rename mangle_path() to seq_mangle_path(), and also remove the export since it's not needed or used by any modules. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Alex Hung <alex.hung@amd.com> Link: https://patch.msgid.link/20260727195730.2306887-1-alex.hung@amd.com Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
+5
-6
@@ -428,7 +428,7 @@ EXPORT_SYMBOL(seq_bprintf);
|
|||||||
#endif /* CONFIG_BINARY_PRINTF */
|
#endif /* CONFIG_BINARY_PRINTF */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mangle_path - mangle and copy path to buffer beginning
|
* seq_mangle_path - mangle and copy path to buffer beginning
|
||||||
* @s: buffer start
|
* @s: buffer start
|
||||||
* @p: beginning of path in above buffer
|
* @p: beginning of path in above buffer
|
||||||
* @esc: set of characters that need escaping
|
* @esc: set of characters that need escaping
|
||||||
@@ -438,7 +438,7 @@ EXPORT_SYMBOL(seq_bprintf);
|
|||||||
* Returns pointer past last written character in @s, or NULL in case of
|
* Returns pointer past last written character in @s, or NULL in case of
|
||||||
* failure.
|
* failure.
|
||||||
*/
|
*/
|
||||||
char *mangle_path(char *s, const char *p, const char *esc)
|
char *seq_mangle_path(char *s, const char *p, const char *esc)
|
||||||
{
|
{
|
||||||
while (s <= p) {
|
while (s <= p) {
|
||||||
char c = *p++;
|
char c = *p++;
|
||||||
@@ -457,7 +457,6 @@ char *mangle_path(char *s, const char *p, const char *esc)
|
|||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(mangle_path);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* seq_path - seq_file interface to print a pathname
|
* seq_path - seq_file interface to print a pathname
|
||||||
@@ -477,7 +476,7 @@ int seq_path(struct seq_file *m, const struct path *path, const char *esc)
|
|||||||
if (size) {
|
if (size) {
|
||||||
char *p = d_path(path, buf, size);
|
char *p = d_path(path, buf, size);
|
||||||
if (!IS_ERR(p)) {
|
if (!IS_ERR(p)) {
|
||||||
char *end = mangle_path(buf, p, esc);
|
char *end = seq_mangle_path(buf, p, esc);
|
||||||
if (end)
|
if (end)
|
||||||
res = end - buf;
|
res = end - buf;
|
||||||
}
|
}
|
||||||
@@ -520,7 +519,7 @@ int seq_path_root(struct seq_file *m, const struct path *path,
|
|||||||
return SEQ_SKIP;
|
return SEQ_SKIP;
|
||||||
res = PTR_ERR(p);
|
res = PTR_ERR(p);
|
||||||
if (!IS_ERR(p)) {
|
if (!IS_ERR(p)) {
|
||||||
char *end = mangle_path(buf, p, esc);
|
char *end = seq_mangle_path(buf, p, esc);
|
||||||
if (end)
|
if (end)
|
||||||
res = end - buf;
|
res = end - buf;
|
||||||
else
|
else
|
||||||
@@ -544,7 +543,7 @@ int seq_dentry(struct seq_file *m, struct dentry *dentry, const char *esc)
|
|||||||
if (size) {
|
if (size) {
|
||||||
char *p = dentry_path(dentry, buf, size);
|
char *p = dentry_path(dentry, buf, size);
|
||||||
if (!IS_ERR(p)) {
|
if (!IS_ERR(p)) {
|
||||||
char *end = mangle_path(buf, p, esc);
|
char *end = seq_mangle_path(buf, p, esc);
|
||||||
if (end)
|
if (end)
|
||||||
res = end - buf;
|
res = end - buf;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ static inline void seq_setwidth(struct seq_file *m, size_t size)
|
|||||||
}
|
}
|
||||||
void seq_pad(struct seq_file *m, char c);
|
void seq_pad(struct seq_file *m, char c);
|
||||||
|
|
||||||
char *mangle_path(char *s, const char *p, const char *esc);
|
char *seq_mangle_path(char *s, const char *p, const char *esc);
|
||||||
int seq_open(struct file *, const struct seq_operations *);
|
int seq_open(struct file *, const struct seq_operations *);
|
||||||
ssize_t seq_read(struct file *, char __user *, size_t, loff_t *);
|
ssize_t seq_read(struct file *, char __user *, size_t, loff_t *);
|
||||||
ssize_t seq_read_iter(struct kiocb *iocb, struct iov_iter *iter);
|
ssize_t seq_read_iter(struct kiocb *iocb, struct iov_iter *iter);
|
||||||
|
|||||||
+1
-1
@@ -321,7 +321,7 @@ int seq_buf_path(struct seq_buf *s, const struct path *path, const char *esc)
|
|||||||
if (size) {
|
if (size) {
|
||||||
char *p = d_path(path, buf, size);
|
char *p = d_path(path, buf, size);
|
||||||
if (!IS_ERR(p)) {
|
if (!IS_ERR(p)) {
|
||||||
char *end = mangle_path(buf, p, esc);
|
char *end = seq_mangle_path(buf, p, esc);
|
||||||
if (end)
|
if (end)
|
||||||
res = end - buf;
|
res = end - buf;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user