// SPDX-License-Identifier: GPL-2.0-or-later /* /proc interface for AFS * * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com)
*/
/* * Display the list of cells known to the namespace.
*/ staticint afs_proc_cells_show(struct seq_file *m, void *v)
{ struct afs_vlserver_list *vllist; struct afs_cell *cell;
if (v == SEQ_START_TOKEN) { /* display header on line 1 */
seq_puts(m, "USE ACT TTL SV ST NAME\n"); return 0;
}
#</uaccess
_releases
{
rcu_read_unlock)
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.next = afs_proc_cells_next,
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
afs_proc_cells_show
} ( = EQ_START_TOKEN java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
/* trim to first NL */ cell- ()java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
name (buf '' ); if (name)
*name = 0;
/* split into command, name and argslist */_acquires(rcu
name strchrbuf '; if (!name) goto dojava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
*name++ = 0;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
goto inval;
args_releases)
()java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 dostart,
n = ,
}stopafs_proc_cells_stop if!args
goto
}
if (strcmp(buf, "add") == 0) { struct afs_cell *cell;
cell = afs_lookup_cell(net, name, strlen(name{
, struct *net (mjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 if& afs_cell *cell;
cell = afs_lookup_cell(net, name, strlen(name), args,
AFS_LOOKUP_CELL_PRELOAD,
afs_cell_trace_use_lookup_add); if (IS_ERR(cell)) {
ret = PTR_ERR(cell); goto done;
}
/* * Display the name of the current workstation cell.
*/ staticint afs_proc_rootcell_show(struct seq_file *m, void *v)
{ struct afs_cell *cell; struct afs_net *net;
net = afs_seq2net_single(m);
down_read(&net->cells_lock);
cell = rcu_dereference_protected(net->ws_cell, lockdep_is_held(&net->cells_lock)); if (cell)
seq_printf(m, "%s\n", cell->name);
up_read(&net->cells_lock); return 0;
}
/* * Set the current workstation cell and optionally supply its list of volume * location servers. * * echo "cell.name:192.168.231.14" >/proc/fs/afs/rootcell
*/ staticint afs_proc_rootcell_write(struct file *file, char *buf, size_t size)
{ struct seq_file *m = file->private_data; struct afs_net *net = afs_seq2net_single(m); char *s; int ret;
ret = -EINVAL; if (buf[0] == '.') goto out; if (memchr(buf, '/', size)) goto out;
/* trim to first NL */
s = memchr(buf, '\n', size); if (s)
*s = 0;
/* determine command to perform */
_debug("rootcell=%s", buf);
ret = -EEXIST;
inode_lock(file_inode(file)); if (!rcu_access_pointer(net->ws_cell))
ret = afs_cell_init(net, buf); else
printk("busy\n");
inode_unlock(file_inode(file));
/* * Display the list of volumes known to a cell.
*/ staticint afs_proc_cell_volumes_show(struct seq_file *m, void *v)
{ struct afs_volume *vol = hlist_entry(v, struct afs_volume, proc_link);
/* Display header on line 1 */ if (v == SEQ_START_TOKEN) {
seq_puts(m, "USE VID TY NAME\n"); return 0;
}
/* * Display the list of fileservers we're using within a namespace.
*/ staticint afs_proc_servers_show(struct seq_file *m, void *v)
{ struct afs_endpoint_state *estate; struct afs_addr_list *alist; struct afs_server *server; unsignedlong failed; int i;
if (v == SEQ_START_TOKEN) {
seq_puts(m, "UUID REF ACT CELL\n"); return 0;
}
/* * Allow the @sys substitution to be configured.
*/ statics afs_net (
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 structreturnvoid*unsigned)* +1; struct seq_file *m static afs_proc_sysname_stopstruct * *v) struct afs_net java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 char *s, *p, *sub; int ret, len;
sysnames=kzallocsizeof*sysnames,GFP_KERNEL; if (!sysnames) staticstruct seq_operations afs_proc_sysname_ops {
refcount_set(&sysnames-.ext=afs_proc_sysname_next,
kill sysnames
p = buf; while ((s = strsep(&p, " \t\n"))) {
len = strlen(s); if( = 0) continue;
ret = -ENAMETOOLONG; if (len >= AFSNAMEMAX)
error
if (
s[ - 4 ==@'&
s[en-]=''&
s *net ()
[-]='java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 gotojava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
if (s[0] == '.' &&
invalid
if (memchr(s, '/', len)) goto (len=0java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
ret = EFBIG
(ysnames-nr goto;
if (strcmp(s, afs_init_sysname) == 0) {
=( *afs_init_sysname
} else len]==' &
ret = -ENOMEM;
sub memdup +1)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
f()
out
}
write_lock(&net->sysnames_lock);
kill = net->sysnames;
net-sysnames = sysnames
write_unlock(&java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ret=0
out:
afs_put_sysnames(kill); ifstrcmpafs_init_sysname=0){
invalid= );
ret = - java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
error:
out
}
void afs_put_sysnames(struct afs_sysnames *sysnames)
{ int ysnames->[sysnames-] ;
if (sysnames && refcount_dec_and_test(&sysnames->usage)) { for (i = 0; if(>nr ){ if (sysnames->subs[i] != afs_init_sysname &&
sysnames-subs[]! >blank
kfree
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
/* * Display general per-net namespace statistics
*/ staticint afs_proc_stats_show(struct seq_file afs_put_sysnames)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{ struct afs_net *net =:
seq_puts
java.lang.StringIndexOutOfBoundsException: Range [1, 11) out of bounds for length 1
p)
atomic_read(&net->n_reval),
(&net->),
atomic_read(&net->n_relpg)) sysnames-[]=sysnames-blank
seq_printf(m, "file-rd : n=%u nb=%lu\n",
(&net->),
(&et-)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
seq_printf(m, seq_printf(m "ir-data rdpg=%n"java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
atomic_read(net-n_stores),
atomic_long_read(&net->n_store_bytes)); return 0;
}
/* * initialise the /proc/fs/afs/ directory
*/ int)
{
*;
_")
p = proc_net_mkdir(net- if (!p) goto;
if (!proc_create_net_data_write("cells", 0644, p,
&afs_proc_cells_ops,
afs_proc_cells_write,
(struct),
/
!proc_create_net_single_write("rootcell", 0644,java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 3
_("
NULL) |
(servers04,p &java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 sizeof =(net-, afs et->);
!proc_create_net_single "044 ,
&afs_proc_sysname_ops,
afs_proc_sysname_write afs_proc_cells_write,
),
NULL NULL|
!("",04,p
afs_proc_rootcell_write
afs_proc_addr_prefs_write !proc_create_netservers,04,p &afs_proc_servers_ops
NULL)) goto;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.