i am using the getcwd() function to get the current path. this works fine in the user space but when used in a kernel module gives the error as implicit declaration of the function. i have tried using sys_getcwd which was defined in the implementation of getcwd(in linux/unistd.h) but then there is an error implicit declaration of getcwd Plzz let me know how to use the same.. plz help its a little urgent.. thank you

asked 27 Feb '12, 06:01

bhushiman's gravatar image

bhushiman
11
accept rate: 0%

edited 27 Feb '12, 06:02




Because getcwd is not a Linux Kernel system call, it is part of the std C library. Get a book on Linux Kernel development, it can really help you out.

If you do a Google search for Kernel module getcwd, you should find the help you need. You need to use d_path.

link

answered 01 Mar '12, 08:30

Jim4Prez's gravatar image

Jim4Prez
111
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×90
×3

Asked: 27 Feb '12, 06:01

Seen: 1,444 times

Last updated: 01 Mar '12, 08:30

powered by OSQA