Re: none

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

 



>>>>> "dinesh" == Dinesh Gandhewar <gdinesh16@rediffmail.com> writes:

dinesh> Hello,
dinesh> Can you explain this code segment?

dinesh> oldfs = get_fs(); set_fs(KERNEL_DS);
dinesh> err = file.f_op->read(&file, buf, *count, &file.f_pos);
dinesh> set_fs(oldfs);

dinesh> What is the functionality of get_fs() and set_fs().

Very ugly old hack to make able to call functions that expect
parameters in User Space to be called from the kernel.

Later, Juan.

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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