bugdmidecode - Bugs: bug #16114, not a bug, DJGPP porting info for...

 
 

bug #16114: not a bug, DJGPP porting info for dmidecode2.8

Submitted by:  None
Submitted on:  Fri 17 Mar 2006 12:57:39 AM UTC  
 
Category: NoneSeverity: 1 - Wish
Item Group: NoneStatus: Need Info
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 01 Nov 2007 08:49:55 AM UTC, comment #2:

I'm closing this "bug" now. Anyone interested in getting dmidecode to build with DJGPP, please post a proper patch against the latest version of dmidecode.

Jean Delvare <khali>
Project Administrator
Sat 13 May 2006 03:15:33 PM UTC, comment #1:

One or more patches would be much preferred. It's quite hard to figure out exactly what changes you did.

I'm glad to see that my code is clean and portable enough so that you could so easily port it.

1) Obviously not a dmidecode bug.

2) You don't need to modify the files. Instead, add "-I." to the compilation lines.

4) Not sure exactly why it is a bug, no problem was reported with this part of the code so far (but I admit it was added recently.) Changing "0xf0000" to "0xf0000UL" seems to be a better fix though (if it works for you.)

6) OK. This function is getting a bit messy by now though, at some point in time we'll have to think of a better way to handle the different memory access methods.

PS No, I'm not going to post on some random newsgroup to contact you. Work on dmidecode should be discussed here (register a Savannah account) or on the dmidecode-devel mailing list.

PPS This has to be a joke? No, we're not going to turn greylisting and spam filtering off just for you. Instead, you should use a decent e-mail client and outgoing SMTP server which can deal properly with these technical measures.

Jean Delvare <khali>
Project Administrator
Fri 17 Mar 2006 12:57:39 AM UTC, original submission:

Thanks for the utilities. I just ported it to DJGPP. It ported very easily, so I could have ported it to OpenWatcom as well, but I don't have the time. The following lists the changes necessary:

1) added missing getopt files, from DJGPP's make (or many other DJGPP utils...)

getopt.h
getopt.c
getopt1.c
gettext.h

1a) fix bug line 695 of getopt.c
if (opterr) missing braces around if-else

1b) fix bug line 108 of getopt.h no args
extern int getopt (int argc, char const argv, const char *optstring);

2) changed global #include <getopt.h> to local "getopt.h" in files:

bioddecode.c
dmiopt.c
ownership.c
vpdopt.c

#ifdef _DJGPP_
#include "getopt.h"
#else
#include <getopt.h>
#endif

3) changed config.h #ifndef _BEOS_
#if !defined( _BEOS_ ) && !defined( _DJGPP_ )

4) fixed bug in vpddecode.c line 356 missing cast
(unsigned long)0xf0000+fp);

5) changed util.c #ifndef USE_MMAP
#if !defined( USE_MMAP ) && !defined( _DJGPP_ )

6) changed DJGPP routine to util.c mem_chunk()

void mem_chunk(size_t base, size_t len, const char devmem)
{
#ifndef _DJGPP_
/* original body of mem_chunk() function goes here */
#else /* DJGPP */

#include <go32.h>
#include <dpmi.h>
#include <sys\nearptr.h>

unsigned long CS_base;
void *p;

if((p=malloc(len))==NULL)
{
perror("malloc");
return NULL;
}

__dpmi_get_segment_base_address(_my_cs(), &CS_base);
__djgpp_nearptr_enable();

memcpy(p,(unsigned char *)base-CS_base,len);

return p;
#endif /* DJGPP */
}

7) copy makefile to makefile.dj and add to rules and rules for getopt.o and
getopt1.o to makefile

Rod Pemberton

PS You can post to comp.os.mdos.djgpp if you need to contact me.

PPS You need to have your isp turn greylisting off and spam filtering off. -unavailable- and -unavailable- both refuse to authenticate my email client. Due to the difficulties getting this to you, I shouldn't have bothered trying to post this here either...

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by khali (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 01 Nov 2007 08:49:55 AM UTCkhaliOpen/ClosedOpen=>Closed
    Thu 01 Nov 2007 08:49:54 AM UTCkhaliStatusNone=>Need Info
    Sat 13 May 2006 03:15:33 PM UTCkhaliSeverity3 - Normal=>1 - Wish

    Back to the top


    Powered by Savane 3.1-cleanup1