Index: shfs-0.35/shfs/Linux-2.4/shell.c =================================================================== --- shfs-0.35.orig/shfs/Linux-2.4/shell.c 2007-06-04 13:22:57.970042496 +0200 +++ shfs-0.35/shfs/Linux-2.4/shell.c 2007-06-04 13:22:59.249847936 +0200 @@ -213,6 +213,7 @@ int c = 0; int is_space = 1; int device = 0; + char *start = s; while (*s) { if (c == DIR_COLS) @@ -227,17 +228,20 @@ s++; } *s = '\0'; + start = s+1; is_space = 1; + } else { + if (c != DIR_NAME) + start = s+1; } } else { if (is_space) { /* (b)lock/(c)haracter device hack */ - col[c++] = s; + col[c++] = start; is_space = 0; if ((c-1 == DIR_PERM) && ((*s == 'b')||(*s == 'c'))) { device = 1; } - } } s++; Index: shfs-0.35/shfs/Linux-2.6/shell.c =================================================================== --- shfs-0.35.orig/shfs/Linux-2.6/shell.c 2007-06-04 13:22:57.977041432 +0200 +++ shfs-0.35/shfs/Linux-2.6/shell.c 2007-06-04 13:22:59.249847936 +0200 @@ -225,6 +225,7 @@ int c = 0; int is_space = 1; int device = 0; + char *start = s; while (*s) { if (c == DIR_COLS) @@ -239,17 +240,20 @@ s++; } *s = '\0'; + start = s+1; is_space = 1; + } else { + if (c != DIR_NAME) + start = s+1; } } else { if (is_space) { /* (b)lock/(c)haracter device hack */ - col[c++] = s; + col[c++] = start; is_space = 0; if ((c-1 == DIR_PERM) && ((*s == 'b')||(*s == 'c'))) { device = 1; } - } } s++; en/xen/?h=staging-4.1'>summaryrefslogtreecommitdiffstats
path: root/xen/common/multicall.c
blob: cbdf20b63e9001b9a939f5502a13e52eea4eee49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/******************************************************************************
 * multicall.c
 */

#include <xen/config.h>
#include <xen/types.h>
#include <xen/lib.h>
#include <xen/mm.h>
#include <xen/perfc.h>
#include <xen/sched.h>
#include <xen/event.h>
#include <xen/multicall.h>

struct mc_state mc_state[NR_CPUS];

long do_multicall(multicall_entry_t *call_list, unsigned int nr_calls)
{
    struct mc_state *mcs = &mc_state[smp_processor_id()];
    unsigned int     i;

    if ( unlikely(__test_and_set_bit(_MCSF_in_multicall, &mcs->flags)) )
    {
        DPRINTK("Multicall reentry is disallowed.\n");
        return -EINVAL;
    }

    if ( unlikely(!array_access_ok(VERIFY_WRITE, call_list,