HI everyone
I'm reading ldd and trying to use scull. when i try "cat somefile >
/dev/scull0" ,it told me "write error: No space left on device",I'm not
sure if i must allocate space for scull first. Anyone please tell me
why?
Printable View
HI everyone
I'm reading ldd and trying to use scull. when i try "cat somefile >
/dev/scull0" ,it told me "write error: No space left on device",I'm not
sure if i must allocate space for scull first. Anyone please tell me
why?
[email]hide1713@gmail.com[/email] wrote:
[color=blue]
> HI everyone
> I'm reading ldd and trying to use scull. when i try "cat somefile >
> /dev/scull0" ,it told me "write error: No space left on device",I'm not
> sure if i must allocate space for scull first. Anyone please tell me
> why?[/color]
In scull_write try putting some printKs and see where you are getting
returned with errors.
scull write is assigned in scull_fops in main.c. Is your somefile size
exceeding SCULL_P_BUFFER?
miline wrote:[color=blue]
> [email]hide1713@gmail.com[/email] wrote:
>[color=green]
> > HI everyone
> > I'm reading ldd and trying to use scull. when i try "cat somefile >
> > /dev/scull0" ,it told me "write error: No space left on device",I'm not
> > sure if i must allocate space for scull first. Anyone please tell me
> > why?[/color]
>
> In scull_write try putting some printKs and see where you are getting
> returned with errors.
> scull write is assigned in scull_fops in main.c. Is your somefile size
> exceeding SCULL_P_BUFFER?[/color]
my SCULL_P_BUFFER is 4000 (i think it's big enough) and
my output is " ls -l>scull2
ls: write error: No space left on device"
" ls -l|/dev/scull
bash: /dev/scull: Permission denied"
lrwxrwxrwx 1 root root 6 Sep 21 21:59 scull -> scull0
'crw-rw-r-- 1 root root 253, 0 Sep 21 21:59 scull0
I'm using x86 fedora core 5
[email]hide1713@gmail.com[/email] wrote:[color=blue]
> miline wrote:[color=green]
> > [email]hide1713@gmail.com[/email] wrote:
> >[color=darkred]
> > > HI everyone
> > > I'm reading ldd and trying to use scull. when i try "cat somefile >
> > > /dev/scull0" ,it told me "write error: No space left on device",I'm not
> > > sure if i must allocate space for scull first. Anyone please tell me
> > > why?[/color]
> >
> > In scull_write try putting some printKs and see where you are getting
> > returned with errors.
> > scull write is assigned in scull_fops in main.c. Is your somefile size
> > exceeding SCULL_P_BUFFER?[/color]
>
> my SCULL_P_BUFFER is 4000 (i think it's big enough) and
> my output is " ls -l>scull2[/color]
Possibly try writing lesser bytes. < 4000. or u mite wanna make ur
array circular i.e. if the end is reached, wrap it top.
[color=blue]
> ls: write error: No space left on device"
> " ls -l|/dev/scull
> bash: /dev/scull: Permission denied"
>
> lrwxrwxrwx 1 root root 6 Sep 21 21:59 scull -> scull0
>
> 'crw-rw-r-- 1 root root 253, 0 Sep 21 21:59 scull0
>
> I'm using x86 fedora core 5[/color]