Changeset 1375 in MondoRescue


Ignore:
Timestamp:
Apr 30, 2007, 11:18:15 AM (17 years ago)
Author:
Bruno Cornec
Message:
  • ARCH removed from configure.in as useless
  • addition of get_uname_m (to give the underlying arch)
  • get_architecture now returns correctly the built arch used (including x86_64)
  • IA32 is defined for both i386 and x86_64. An additional vdefine X86_64 is also setup for tha later arch.
Location:
branches/2.2.4/mondo
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.4/mondo/configure.in

    r919 r1375  
    8484case "$host_cpu" in
    8585    i?86*)
    86     #x86_64*)
    87         ARCH=i386
    8886        CPPFLAGS="$CPPFLAGS -D__IA32__"
    8987        ;;
     88    x86_64*)
     89        CPPFLAGS="$CPPFLAGS -D__IA32__ -D__X86_64__"
     90        ;;
    9091    ia64*)
    91         ARCH=ia64
    9292        CPPFLAGS="$CPPFLAGS -D__IA64__"
    9393        ;;
    9494    *)
    95         echo "*** Sorry, only Intel Architectures (ia32, ia64) are supported at this time. Want to help?"
     95        echo "*** Sorry, only Intel Architectures (ia32, x86_64, ia64) are supported at this time. Want to help?"
    9696        ;;
    9797esac
    98 AC_SUBST(ARCH)
    9998
    10099LIBS="$LIBS $PTHREAD"
  • branches/2.2.4/mondo/src/common/libmondo-tools.c

    r1372 r1375  
    184184#include <netinet/in.h>
    185185#include <arpa/inet.h>
     186#include <sys/utsname.h>
    186187
    187188/*@unused@*/
     
    358359
    359360
    360 char *get_architecture()
    361 {
     361char *get_architecture(void) {
    362362#ifdef __IA32__
    363     return ("i386");
     363#   ifdef __X86_64__
     364        return ("x86_64");
     365#   else
     366        return ("i386");
     367#   endif
    364368#endif
    365369#ifdef __IA64__
     
    370374
    371375
    372 
    373 double get_kernel_version()
     376char *get_uname_m(void) {
     377
     378    struct utsname utsn;
     379    char *tmp = NULL;
     380
     381    uname(&utsn);
     382    mr_asprintf(&tmp, utsn.machine);
     383    return (tmp);
     384}
     385
     386
     387
     388double get_kernel_version(void)
    374389{
    375390    char *p, tmp[200];
  • branches/2.2.4/mondo/src/common/libmondo-tools.h

    r128 r1375  
    4949double get_kernel_version();
    5050char *get_architecture();
     51char *get_uname_m();
    5152bool does_nonMS_partition_exist(void);
    5253void stop_magicdev_if_necessary(void);
  • branches/2.2.4/mondo/src/mondoarchive/main.c

    r1319 r1375  
    153153void welcome_to_mondoarchive(void)
    154154{
     155    char *tmp = NULL;
     156
    155157    log_msg(0, "Mondo Archive v%s --- http://www.mondorescue.org",
    156158            PACKAGE_VERSION);
    157     log_msg(0, "running on %s architecture", get_architecture());
     159    log_msg(0, "running %s binaries", get_architecture());
     160    tmp = get_uname_m();
     161    log_msg(0, "running on %s architecture", tmp);
     162    mr_free(tmp);
    158163    log_msg(0,
    159164            "-----------------------------------------------------------");
Note: See TracChangeset for help on using the changeset viewer.