LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-25-2010, 06:08 AM   #1
wagmare
Member
 
Registered: Jan 2009
Posts: 62

Rep: Reputation: 15
problem in patch file inclusion


hi friends,

i am new to linux . so i am not so familiar with patch applying in source ...
i compiled my sysfsutils-2.1.0 source successfully but the problem is that i need to apply to patch in its source file ...
the two patches they mention is

--- sysfsutils-0_2_0/lib/sysfs_device.c.orig 2003-10-17 11:25:37.000000000 -0
700
+++ sysfsutils-0_2_0/lib/sysfs_device.c 2003-10-20 12:41:59.000000000 -0700
@@ -80,6 +80,7 @@
errno = EINVAL;
return NULL;
}
+ strcpy(attrname, name);
dlist_for_each_data(dev->directory->attributes, cur,


and

--- sysfs_dir.c.orig 2003-08-29 04:43:27.000000000 -0700
+++ sysfs_dir.c 2003-11-20 11:28:36.000000000 -0800
@@ -274,6 +274,7 @@
errno = EINVAL;
return -1;
}
+ attr->value = malloc(sizeof(value));
strncpy(attr->value,value,sizeof(value));
if ((sysfs_write_attribute(attr) != 0 )) {
dprintf("Error write to attribute %s\n", attrpath)


i can edit the lib/sysfs_dir.c and sysfs_device.c but i dont know where to add these lines in the .c file ... where they mentioned the line number i cant get it ..


the link is http://openhpi.sourceforge.net/manual/x415.html
please help me

Last edited by wagmare; 05-25-2010 at 06:31 AM.
 
Old 05-25-2010, 07:56 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
You have to apply these patches using 'patch' command, see:
http://www.linuxhq.com/patch-howto.html
http://www.cyberciti.biz/faq/appy-pa...patch-command/

Copy the above text that you posted into two files = patches, then apply them in order.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
patch problem - can't find file to patch jnutt Linux - Kernel 3 02-10-2010 03:45 PM
PHP file inclusion warning chus_84 Programming 5 07-18-2008 08:44 AM
LXer: Yrch! "path" Parameter Handling Remote PHP File Inclusion ... LXer Syndicated Linux News 0 12-29-2006 11:33 PM
File inclusion vulnerabilities coolb Linux - Security 1 05-20-2006 08:51 PM
.h File Inclusion in C++ Hady Programming 6 05-31-2005 08:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration