Re: character device driver reading only last character of buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>   copy_from_user(memory_buffer,tmp,count<10 ? count : 10);
>   return 1;
> }
>
>
> The above also did not worked when I had posted this in the first post I
> have changed kmalloc and copy_from_user, copy_to_user
> as some of you above have suggested to have a buffer size type of thing but
> it also did not worked.
>

isn't that supposed to be:
copy_from_user(memory_buffer,buf,count<10 ? count : 10)
?

And just make sure you copy it right, e.g which pointer hold address
to user space and which one toward kernel space

NB: "no one can stop us from asking..."

Bond, did you remember when I said "you remind me to my younger days"?
I was as rude as you're...maybe more, hell lot more. And what did I
get....certainly not respect...even a bit.

When a senior member like Greg Freemyer respond like that, it must be
something that bothered him. To the best I know, Greg is one of the
best and helpful person here. His experience is certainly way way
above the average ( see his posts when dealing with storage and
filesystem).

So, instead of replying like that...which just asking for more
trouble...why not take a step or two back and think "what did I do
wrong?". Then open dialog.

I am sure Greg is not asking for bloated respect, not at all. He just
wanted you to do more on your own based on everybody cues here.

PS: You feel clueless? you're not the first...and certainly won't be
the last. face it, this is real world..not wonderland...nor heaven.
Sometimes you need to work on your own really really hard to teach
yourself. But the reward? fantastic...

But should that make you rude to newbie after you? nope. You know
something, you tell them...you don't know, then say sorry or just
pass. If they cry like baby, let them... after a moment..they will
grow up. I can guarantee that..

Hope you're not bored...

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux