Applying a patch file to source code

Hi,
In reference to this post: http://forum.eeeuser.com/viewtopic.php?pid=30515#p30515
Please could someone explain to me how to apply the patch to the source code?
I tried: cat patch_file | patch -p0 where patch_file contained the patch code,
[jack@tmain L2-linux-driver_new]$ cat patch_file | patch -p0
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|Only in l2.fixed: Module.symvers
|diff -u l2/at_ethtool.c l2.fixed/at_ethtool.c
|--- l2/at_ethtool.c 2007-04-20 09:34:48.000000000 +0200
|+++ l2.fixed/at_ethtool.c 2007-11-25 01:58:24.000000000 +0100
My directory structure is as follows:
[jack@tmain L2-linux-driver_new]$ ls -R
COPYING atl2.spec patch_file release_note.txt
atl2.7 ldistrib.txt readme src
./src:
Makefile at_ethtool.c at_hw.h at_osdep.h kcompat.c kcompat_ethtool.c
at.h at_hw.c at_main.c at_param.c kcompat.h
I tried renaming src to l2, but that gave me further errors.
Any ideas?
Thanks alot,
Jack
Last edited by tntcoda (2007-12-25 23:55:43)

Thanks, that gave me:
[jack@tmain l2]$ patch -Np1 -i patch_file
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|Only in l2.fixed: Module.symvers
|diff -u l2/at_ethtool.c l2.fixed/at_ethtool.c
|--- l2/at_ethtool.c 2007-04-20 09:34:48.000000000 +0200
|+++ l2.fixed/at_ethtool.c
Thats the same even if i rename src to l2, so that l2/at_ethtool.c exists.

Similar Messages

  • Conversion of class files to source codes

    I was informed that it is possible to convert class files back to the java sourcs codes from where those are generated. How can I protect my source codes from illegal copying by others ?

    hai ,
    yes it is possible to convert class file into source code. there is a software called jad.exe available in the net
    using witch u can convert class file into jar file. but i don't know how to protect the class file to avoid the illigal convertion.

  • How to calculates averages and send to a file?(source code)

    how to calculates averages and send to a file?(source code) I need to get started but I don't know where to begin...........the book I have doesn't really say how to handle averages and send to a file.................anybody got suggestions on how to get started? I am a newbie so place in layman's terms.............thanx

    To calculate an average: add all of the numbers together and divide by how many numbers you added together.
    ex: (1 + 2 + 3 + 10)/4 = 4 (4 is the average)
    As for writing them to a file, look over the API for random or sequential access files.

  • Jar file and source code? (new to java!)

    Hi all!
    Sorry if this is a dumb question but I'm really new to java (.net guy).
    Someone sent me a jar file and now I need access to source code. I now that I can rename to .zip and view its contents (.class)...
    But what about source code? Can I decompile? As i understand, .class files are compiled .java files...
    Should I ask for the source code to the guys that sent me the .jar file?
    thanks
    jay

    Humm... is java as fast as replies in this forum? Thank's for your replies warnerja and zadok
    I need the source code so that I can understand how the original developer solved a problem. I can ask for the source code.
    I posted this message because I was afraid that the question was stupid and source code was in front of me. I am really new to java!
    So. No source code in .jar or .class files. Right?
    Thanks
    Jay

  • How to calculate averages and send to a file?(source code)

    Having trouble the book isn't very clear on how to use averages.............could some give me an example of a program..................that gets averages and send to a file..........?

    From Deitel and Deitels monster 'How to Program' :
    import javax.swing.JOptionPane;
    public class Average {
    public static void main ( String args[] )
    int total, gradeCounter, gradeValue, average;
    Swing grade;
    total = 0;
    gradeCounter = 1;
    while ( gradeCounter <= 10 ) {      //assuming 10 values
    grade = JOption.showInputDialog ( "Enter grade: " ) ;
    gradeValue = Integer.parseInt ( grade );
    total += gradeValue;
    gradeCounter = gradeCounter + 1;
    average = total / 10;
    JOptionPane.showMessageDialog (
    null, "Class Average is" + average, "Class Average",
    JOptionPane.INFORMATIOIN_MESSAGE );
    System.exit ( 0 );
    Import package java.io
    Three stream objects are created when you execute , System.in, System.out, System.err
    System.out can be directed to send it's output to a file or disk.

  • Attaching source code of jar files in ecllipse edidor

    Hi all,
    i want to attach source code for jre system library 1.5 while i am using ecllipse 3.2. i also want to attach other source code for struts.jar .
    but i am unable to do it.
    my another problem is that i have struts.jar 1.2.9 and source code for that version is not available on the apache site.
    so please help me to attaching source file with jar files.
    thanks.

    source code for jre system library 1.5 under eclipse: Window -> Preferences ->
    Installed JREs -> here add JDK and not JRE
    (that's all !!)
    source code for struts.jardownload struts.xxx-src.zip from struts web site the
    add it to your struts project repository. Write some
    code that uses the struts API then select a struts
    class (ActionForm for example) and hit F3 keyboard
    key. Finally, click the button Attach
    Source... and select struts.xxx-src.zip you've
    just downloaded.
    do the same thing for all other jar which have a
    source code
    hope that helpsRather than change JVMs to do this, you could just follow java_2006's instructions for the JRE, looking for the source inside the folder where your JDK is installed. It's in a file called src.zip

  • How can I make my source code with jar file?

    I use JDK1.6.0. I can open a class file from rt.jar and get its source code. Does this because open source JDK? I wander how I can make my jar file with source code.

    CeciNEstPasUnProgrammeur wrote:
    youhaodiyi wrote:
    But why I can read source code from rt.jar? I found there are only class files in it.I say it's highly likely that you can't and your IDE's settings rather automatically refer to the src.zip file in the JDK's directory.I see. That's true. I use eclipse as the source code reader. It may refer to the source code zip file automatically.
    Thanks all.

  • Where i can find lc workspace bug free source code?

    Hi,
    I have adobe livecycle es2 pack installed alongwith workbench 9.0. i need bug free workspace source code for customization. as souce code availabe in live cycle es2 sdk is not what has been described in "customize workspace ui". I don't want to downlaod full live cycle server again or workbench?
    i just need patched livecycle workspace source code?
    where i can find the zip file or is there any other way to update the same?

    It is not clear what version you have (es2 pack?) but there were definite problems with the workspace source code and customization in the ES2 GM release.  These were fixed in SP1 and are also in SP2.
    Note that the workspace source is distributed in both the LC and Workbench installs but the Workbench install may contain the original GM release source, depending on the Workbench version you have.  Workbench 9.5 was released with LC ES 2.5 (aka SP2), but i'm not sure if that even has the updated source.
    To avoid any confusion, you should only use the source from the LC ES2 install.  And to get the latest workspace source you should apply the latest service pack (this would be SP2 at this time) and get the latest ProcessManagement Patch for SP2.  The workspace source is in the zip file at the location indicated in Jasmine's reply.

  • Installing OBIA 11.1.1.7.1 on Windows 7 (64-bit). While applying platform patches it's failing.

    The final_patching_report.log is showing as follows:
    ----------START OF PATCHING REPORT------------------
    * BIAPPSSHIPHOME Patching Report ..........
    Patch Succeded: fsclite_rel7mlr2_16424872.zip
    Patch Succeded: BISHIPHOME_11_1_1_7_0_GENERIC_130409_1210_16492220.zip
    Patch Succeded: atglite_rel7mlr5A_database_16239380.zip
    Patch Succeded: atglite_rel7mlr5_16480022.zip
    Patch Succeded: fsmlitedb_rel7mlr2_16424869.zip
    Patch Succeded: fsmlite_rel7mlr2_16424870.zip
    Patch Failed: BISERVER_11_1_1_7_0_WINDOWS_X64_130326_2045_4_16583998.zip
    Patch Failed: BIFNDN_11_1_1_7_0_WINDOWS_X64_130322_1000_5_16462147.zip
    * Oracle Common Patching Report ..........
    Patch Failed: p16433147_111170_Generic.zip
    Patch Failed: p16080773_111170_Generic.zip
    Patch Failed: Webservices_Patch-3-PS6RC3_bug-16487786.zip
    Patch Failed: p16433036_111170_Generic.zip
    Patch Failed: JDEVADF_REL7MLR10-RT_16525527.zip
    Patch Failed: WebCenter_BP1REL7RC3_16311963.zip
    Patch Failed: fmw_diagnostics_14757820_2.zip
    Patch Failed: SOACOMMON_REL7B8_16438735.zip
    * SOA Patching Report ..........
    Patch Failed: SOA_REL7B8_16438735.zip
    * ODI Patching Report ..........
    Patch Succeded: p16629917_111170_Generic.zip
    * Weblogic Patching Report ..........
    ----------END OF PATCHING REPORT------------------
    The biappshiphome_win64_patches.log output:
    Oracle Interim Patch Installer version 11.1.0.9.9
    Copyright (c) 2012, Oracle Corporation.  All rights reserved.
    Oracle Home       : C:\MiddlewareHome\Oracle_BI1
    Central Inventory : C:\Program Files\Oracle\Inventory
       from           : n/a
    OPatch version    : 11.1.0.9.9
    OUI version       : 11.1.0.9.0
    Log file location : C:\MiddlewareHome\Oracle_BI1\cfgtoollogs\opatch\opatch2013-07-09_15-31-18PM_1.log
    OPatch detects the Middleware Home as "C:\MiddlewareHome"
    Verifying environment and performing prerequisite checks...
    Prerequisite check "CheckActiveFilesAndExecutables" failed.
    The details are:
    Following files are active :
    C:\MiddlewareHome\Oracle_BI1\\bifoundation\jlib\securityservice-api.jar
    C:\MiddlewareHome\Oracle_BI1\\bifoundation\jlib\common.jar
    C:\MiddlewareHome\Oracle_BI1\\bifoundation\jlib\securityservice.jar
    Log file location: C:\MiddlewareHome\Oracle_BI1\cfgtoollogs\opatch\opatch2013-07-09_15-31-18PM_1.log
    OPatch failed with error code = 73
    Similar output in oracle_common_generic_patches.log.
    There is no output for Weblogic Patching Report.
    Thanks,
    Neeraj

    Hi Niraj,
                   in which method your going to install the OBIEE i.e in the Enterprise installation mode or software installation mode. have u edit the apply platform patch file. will you let me know content in the files.
    Thanks,
    Yogi.

  • Need to view source code for API classes

    Any tips on where to find the .java files or source code for Java 2 5.0 classes?
    With Java being open source, you'd think that it woud be easy to find this. But I've tried doing a few searches but te results haven't been helpful.
    Cheers!

    Yeah I think I found it. Unfortunately there's a problem with downloading from Sun at the moment; fatal exceptions on every attempt.
    Wait and try later, I guess.

  • MSS Source code

    Hi,
    MSS webdynpro version has a file DTRSAP_MSS.sc . I think this file is source code of MSS. Am i right ? How can i use this source codes.
    Best regards,
    Altug Bayram

    Hi Altug,
    This SCA file (which contains the MSS sources) must be imported into your track in CMS. In brief, the steps are:
    1) Create a new track (in CMS Landscape configurator)
    2) Add the software component (SAP_MSS) to the track
    3) Save track definition.
    4) Download all archives (the SCA files corresponding to MSS and its dependent Software Components : SAP-JEE, SAP_JTECHS, SAP_BUILDT) from the service marketplace and place them in the CMS inbox folder.
    5) In the CMS Transport Studio, checkin and import these archives into the Development system.
    6) Import the development configuration (corresponding to this track) in the NetWeaver developer studio.
    This will allow you to work with the MSS sources using the NetWeaver Developer Studio.
    Regards,
    Manohar

  • Practices for maintaining source code patches for branch of OSS project?

    There is this open source project I use and modify for my personal, private use...
    I would like some best-practice/practical experience suggestions on methodology/tools to maintain a growing number of source code patches I have created for said software. (FYI It is generally not mandatory that I upgrade to new version of the software when it comes out. Sometimes I will use the version I have for several versions before getting the new one, and re-implementing my changes. And sometimes I don't even implement the changes; I just run it vanilla.)
    Currently, I download the latest code from SVN, make my changes to the original code files, and keep track of my changes in a text file, which I then dutifully reference to re-create them when I feel like re-synching with the official version. What I would like to have instead is a separate base of code that contains just my modifications, and somehow include/import it as painlessly as possible whenever I get a new version of the official code from SVN.
    What's the best way to go about it? That's why I'm here.
    I realize these situations rarely, if ever, work out perfectly, and I can deal with that. I just want to improve on how things are, now, in anticipation of where I can see them going!
    I have some ideas about how to implement this, but they are of the "naive" variety and I think any tips I could get on method or tools to use would go far. I mean ... is it as simple as declaring new versions of affected methods in my patch code and marking them "overrides"? Also, probably a dumb question but will SVN that will help me do this?
    Thanks for reading, and any response.
    PS - Sorry if this is the wrong forum, but I am just looking for general, tip-of-the-iceberg type tips/links, so I figured folks could drop a quick answer here. TY!

    The patch program on *nix or Cygwin does exactly what you want, and you can create the patchfile using either Subversion or CVS (and any other source control system that provides a diff).
    Here's the article that I always turn to to create a CVS Patch (I have to relearn patching every time I do it): https://developer.mozilla.org/en/Creating_a_patch
    And here's the equivalent from the Subversion FAQ: http://subversion.tigris.org/faq.html#patch
    When I've worked for companies that did local patches, we kept a separate source-control repository/module that held our patches for the various OS libraries that we used. When we'd upgrade, we'd apply the patches and verify they made sense (if you have a lot of patchfiles, this can be a royal pain). And most important, once we had a patched upgrade, we generated a new patchfile from it (because, again, patchfiles become obsolete, and trying to apply a patch from several versions back can sometimes be impossible).
    And of course we submitted any bugfixes back to the projects...

  • Apply diff file to source tree

    Hello,
    I have a source tree and a diff file containing about 200 changes to different files in the source tree.
    In the past I only applied changes to a source tree using patch files, but how do i do this with a diff file?
    I tried stuff like patch srctree -n updates.diff, but that fails ...
    Do i have to create a patch file out of the diff file? Cause i saw that it seems to be the normal case that you create
    patch files using two different source trees and than compare them using diff.
    Thank you!

    Hi!
    thx for the help!
    If i run patch < file.diff i get  " patch: **** Only garbage was found in the patch input. "
    So i assumed the file has no valid format. The head of the file looks like that.
    diff -rN old-ion-3plus-1/README new-ion-3plus/README
    125a126,128
    > The code in `de/unicode' (producing `de/precompose.c') is taken from
    > xterm.
    >
    diff -rN old-ion-3plus-1/build/rules.mk new-ion-3plus/build/rules.mk
    126a127,128
    > DEFINES += -DCF_EXECUTABLE=\"$(EXECUTABLE)\"
    >
    141c143
    < CC_PICFLAGS=-fPIC -DPIC
    > #CC_PICFLAGS=-fPIC -DPIC
    diff -rN old-ion-3plus-1/config.h new-ion-3plus/config.h
    32a33,35
    > #define CF_USERTIME_DIFF_CURRENT 2000
    > #define CF_USERTIME_DIFF_NEW 4000
    >
    diff -rN old-ion-3plus-1/de/Makefile new-ion-3plus/de/Makefile
    14c14
    < SOURCES=init.c draw.c font.c colour.c brush.c fontset.c style.c
    > SOURCES=init.c draw.c font.c colour.c brush.c fontset.c style.c precompose.c
    diff -rN old-ion-3plus-1/de/font.c new-ion-3plus/de/fo
    Should i be able to use this with patch?

  • Patch 9655006 failed with code 135 when applying to Oracle Restart

    Hi all,
    I install Oracle RAC single node version 11.2.0.1 on Linux (kernel 2.6.18).
    I try to apply patch 9655006 (prerequis for upgrade to 11.2.0.2).
    Everything is OK for grid applying with success.
    When I apply this patch to oracle db home, I get :
    Oracle Interim Patch Installer version 11.2.0.1.5
    Copyright (c) 2010, Oracle Corporation. All rights reserved.
    Argument(s) Error... Given 'ocmrf' file does not exists.
    Please check the arguments and try again.
    OPatch failed with error code 135
    I've given the complete path and filename (same as for grid applying).
    I've found A document [ID 1283954.1], but not useful in my case.
    Any ideas for workaround ?
    TIA
    yang
    ps. this does not occur when applying to a RAC with 2 nodes.

    yang wrote:
    Hi all,
    I install Oracle RAC single node version 11.2.0.1 on Linux (kernel 2.6.18).
    I try to apply patch 9655006 (prerequis for upgrade to 11.2.0.2).
    Everything is OK for grid applying with success.
    When I apply this patch to oracle db home, I get :
    Oracle Interim Patch Installer version 11.2.0.1.5
    Copyright (c) 2010, Oracle Corporation. All rights reserved.
    Argument(s) Error... Given 'ocmrf' file does not exists.
    Please check the arguments and try again.
    OPatch failed with error code 135
    I've given the complete path and filename (same as for grid applying).
    I've found A document [ID 1283954.1], but not useful in my case.
    Any ideas for workaround ?
    TIA
    yang
    ps. this does not occur when applying to a RAC with 2 nodes.Hello Yang,
    Could you try it again with debug info? Before you run the opatch, run the following:
    $ set OPATCH_DEBUG=TRUE; export OPATCH_DEBUG
    Regards
    Gokhan

  • Apply a patch which is a diff file

    Hi All
    I although I know how to keep a unix system up and running I actually don't know how to apply the patch for gzip :(
    Its a diff file. Can someone give me the right syntax or point me to the documentation (I looked around at docs.sun.com but didn't find it)
    Thanks a lot
    LuCa

    are you refering to this patch:
    http://www.gzip.org/gzip-1.2.4b.patch
    If you have a compiler installed (such as gcc or cc)
    You can apply this patch if you download the entire gzip source from
    ftp://wuarchive.wustl.edu/mirrors/gnu/gzip/gzip-1.2.4.tar
    then apply the patch using gpatch -p0 < patch file
    .. and compile your own' gzip using:
    ./configure
    make
    make install
    .7/M

Maybe you are looking for

  • Defining User Defined Message in Adhoc SA

    Hi All, Sorry if i am posting same query. Our is Essbase Cube as source for OBIEE Reports. When users are trying to retrive huge set of data it thorws severe Essbase Error during Adhoc Analysis. Can we redirect to some other page or display pop-up me

  • Lost emails on Windows Live Mail

    I have been using Windows Live Mail on my notebook for my emails. I have several folders with loads of saved messages but for some reason when I've logged on today I have nothing showing and I've done nothing that I know of to affect this. How do I g

  • Merge jpeg into pdf problems

    I bought a new Nikon S9700 Coolpix and took 150 jpegs about 500kb each of istoric documents. Tried to merge them to a pdf for transcription with my Adobe Acrobat Pro 9 and it "stops working" when it tries to open the first image file. I tested older

  • Even a hired Flash Technician couldn't figure this out! (button/AS2/link issue)

    I bought a template online, same as half the people on here needing help. I managed most modifications myself and even some swag. But one of the links entitled "more" is correct on the first page but then in AS2 appears to be a duplicate on the 4th p

  • I want my Shopping Cart back  iTunes 9

    How many of you want the Shopping Cart back in iTunes 9 I just went to add something to my cart today and noticed it was gone, replaced by Wish List, hidden at the bottom of the iTunes store. Please Apple, at least move the Wish List to the menu near