euglug.org

[작성자:] admin

  • [Eug-lug] LP64



    T. Joseph CARTERSun Jan 9 04:07:26 PST 2005

    On Sun, Jan 09, 2005 at 12:35:36AM -0800, Jacob Meuser wrote:
    > > OK, that's officially weird.
    > > 
    > > The correct way to fix that code is probably like this:
    > > 
    > >      int data;
    > >      ...
    > >      data = open(...);
    > 
    > yes.
    
    I'll agree with Neil above.
    
    
    > >  I can think of no sensible reason to cast it to
    > > a pointer--it will never point to anything useful, and deferencing it will
    > > probably earn you an immediate trip to the land of segmentation violation.
    > > 
    > > And on an LP64 compiler, casting to a pointer is just plain wrong--ints and
    > > pointers aren't the same size anymore, and you don't want to shut gcc up,
    > > because it's trying to tell you something important.
    > 
    > the thing is, there's also a foo_open function, that returns a
    > pointer to a struct.  the code was apparently written to make
    > open and ibp_open interchangable.  since they have different
    > return types, the author chose to use (void *).  the only use
    > of data is "if(!data) { ... }".
    
    Suggest fixing ibp_open?  (what's it do?)
    
    
  • [Eug-lug] LP64



    Jacob MeuserSun Jan 9 00:35:36 PST 2005

    On Sun, Jan 09, 2005 at 12:14:13AM -0800, Neil Parker wrote:
    > Jacob Meuser wrote,
    > >so I got an amd64 mobo (ASUS KV8 SE Deluxe) and 3000+ CPU.
    > >
    > >now, I've got a programming question ;)
    > >
    > >If there's code that does
    > >
    > >	void *data;
    > >	...
    > >	data = (void*)open(...);
    > >
    > >would it be "fixed" by adding a intptr_t cast?
    > >
    > >	void *data;
    > >	...
    > >	data = (void*)(intptr_t)open(...);
    > >
    > >it shuts gcc up anyway.
    > >
    > >where is intptr_t defined on GNU/Linux?  it's in <inttypes.h> on
    > >OpenBSD.
    > 
    > OK, that's officially weird.
    > 
    > The correct way to fix that code is probably like this:
    > 
    >      int data;
    >      ...
    >      data = open(...);
    
    yes.
    
    > Remember, open() returns an int (specifically, the file descriptor of the
    > file that you just opened).
    
    yes
    
    >  I can think of no sensible reason to cast it to
    > a pointer--it will never point to anything useful, and deferencing it will
    > probably earn you an immediate trip to the land of segmentation violation.
    > 
    > And on an LP64 compiler, casting to a pointer is just plain wrong--ints and
    > pointers aren't the same size anymore, and you don't want to shut gcc up,
    > because it's trying to tell you something important.
    
    the thing is, there's also a foo_open function, that returns a
    pointer to a struct.  the code was apparently written to make
    open and ibp_open interchangable.  since they have different
    return types, the author chose to use (void *).  the only use
    of data is "if(!data) { ... }".
    
    -- 
    <jakemsr at jakmesr.com>
    
  • [Eug-lug] LP64



    Neil ParkerSun Jan 9 00:14:13 PST 2005

    Jacob Meuser wrote,
    >so I got an amd64 mobo (ASUS KV8 SE Deluxe) and 3000+ CPU.
    >
    >now, I've got a programming question ;)
    >
    >If there's code that does
    >
    >	void *data;
    >	...
    >	data = (void*)open(...);
    >
    >would it be "fixed" by adding a intptr_t cast?
    >
    >	void *data;
    >	...
    >	data = (void*)(intptr_t)open(...);
    >
    >it shuts gcc up anyway.
    >
    >where is intptr_t defined on GNU/Linux?  it's in <inttypes.h> on
    >OpenBSD.
    
    OK, that's officially weird.
    
    The correct way to fix that code is probably like this:
    
         int data;
         ...
         data = open(...);
    
    Remember, open() returns an int (specifically, the file descriptor of the
    file that you just opened).  I can think of no sensible reason to cast it to
    a pointer--it will never point to anything useful, and deferencing it will
    probably earn you an immediate trip to the land of segmentation violation.
    
    And on an LP64 compiler, casting to a pointer is just plain wrong--ints and
    pointers aren't the same size anymore, and you don't want to shut gcc up,
    because it's trying to tell you something important.
    
                   - Neil Parker
    
  • [Eug-lug] Connection Teaming



    Derald GrimwoodSat Jan 8 22:14:33 PST 2005

    Hi, I'm going to guess the answer to this question is no, since I couldn't
    find anything on the internet, but does anyone know of any Linux software
    that supports modem/connection teaming? I know about MPPP but that really
    won't work for me. I need to combine landline and wireless modems. Windows
    options are Intergate and Artera Turbo that I've found.
    
    Thanks,
    
    Derald
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://www.euglug.org/pipermail/euglug/attachments/20050108/f279b947/attachment.htm
    
  • [Eug-lug] Printer Question



    Jacob MeuserSat Jan 8 20:18:45 PST 2005

    On Sat, Jan 08, 2005 at 08:12:23PM +0000, Jeff Newton wrote:
    > Well, I have an HP Deskwriter 660C here as well, that I used with my 
    > Mac, but still don't know if that will work either??
    
    this is actually an easy to answer question, as long as you know
    where to get the answer :)
    
    http://www.linuxprinting.org/
    
    on the left, click "Printer Listings".
    
    then choose "HP" and "660c", then click show.
    
    -- 
    <jakemsr at jakemsr.com>
    
  • [Eug-lug] LP64



    Jacob MeuserSat Jan 8 19:44:33 PST 2005

    so I got an amd64 mobo (ASUS KV8 SE Deluxe) and 3000+ CPU.
    
    now, I've got a programming question ;)
    
    If there's code that does
    
    	void *data;
    	...
    	data = (void*)open(...);
    
    would it be "fixed" by adding a intptr_t cast?
    
    	void *data;
    	...
    	data = (void*)(intptr_t)open(...);
    
    it shuts gcc up anyway.
    
    where is intptr_t defined on GNU/Linux?  it's in <inttypes.h> on
    OpenBSD.
    
    -- 
    <jakemsr at jakemsr.com>
    
  • [Eug-lug] New computer still not working…



    Mike CherbaSat Jan 8 19:16:12 PST 2005

    Janie,
    	I think I have an IDE raid card floating around somewhere you could
    try.  Give me a call if you want me to drop it by before I take off. 
    541-683-2794.
    		-Mike
    
    On Sat, 2005-01-08 at 11:26, Linux Rocks! wrote:
    > I still dont have this working. Ive been trying to figure out how the best way 
    > to get it working. I think ive given up on the sis 180 controller. Even 
    > though its "supported" and the driver loads for it, nothing ive done has 
    > gotten it to work, and ive wasted a week trying.
    > 
    > It has another pair of ide channels, the primary one is ata 133, and the 
    > secondary is ata 100.
    > I have these drives:
    > 2x 200gb ata133 ide maxtor drives.
    > 1x 160gb ata133 ide maxtor drive.
    > 1x CD/DVDR
    > 
    > The way your supposed to hook this up, would be with the 160 on /dev/hda, dvdr 
    > on /dev/hdc, and the 200gb disks as master/slave on the sis 180.
    > 
    > This would give me the system on the 160 drive, access to the dvdr (on a ata33 
    > bus), and the raid array (raid0) as data.
    > 
    > Since Im blue in the face from trying for over a week to get that damn 180 
    > controller (not)working, (and its not showing me any errors, none of the help 
    > ive gotten has worked, near as i can tell it should work, but donsn't).
    > 
    > If I do the software raid, it wants those drives to be master (identical disks 
    > on identical controllers), then im going to have an issue with ata100 
    > controller, and ata133 controller, and how am I going to boot the 160gb disk? 
    > and or put the dvdr?
    > 
    > I went by stans yesterday, and he sells cheapo ide raid controllers that shoud 
    > work, but he wont have any till next week. 
    > 
    > I checked into returning these drives for sata drives, but that will cost an 
    > extra $100, and I will end up with 160gb disks instead of 200gb.
    > 
    > Ideally, I would like this to work as advertised, but at this point, im so 
    > damn frustrated that im looking at any alternative that will work.
    > 
    > Jamie 
    > 
    -- 
    Mike Cherba
    Cavium Networks
    883 Brookside Dr
    Eugene, OR 97405
    phone: (541) 684-3820
    mike.cherba at caviumnetworks.com
    www.caviumnetworks.com
    
  • [Eug-lug] Printer Question



    John SechrestSat Jan 8 19:15:01 PST 2005

    Jason <chanjb at yahoo.com> writes:
    
     % Yeah, but free is a good price. Personally, I stick
     % with HP - the LJ 6P and 1100 have been good to me over
     % the years.
    
    
    NO.... Free is not a good price if your maintenance is high.
    
    Look at the total cost of ownership, not at the initial price.
    
    
    
    
    
    
     % Jason
     % 
     % --- Mr O <notanatheist at yahoo.com> wrote:
     % 
     % > Lexmark is a PITA. I'd buy an HP or Epson for linux.
     % > It was a
     % > pain just to get my Canon working but I eventually
     % > got it with
     % > CUPS. Lexmark cartridges far outweigh what the
     % > printer is
     % > actually worth.
     % > 
     % > 
     % > --- Jason <chanjb at yahoo.com> wrote:
     % > 
     % > > Jeff:
     % > > 
     % > > Chances are you'll be able to get it printing,
     % > > although you may not have full functionality. You
     % > can
     % > > check at:
     % > > 
     % > > http://www.linuxprinting.org/printer_list.cgi
     % > > 
     % > > To see what sort of support you might expect (if
     % > you
     % > > have the model number).
     % > > 
     % > > Jason
     % > > 
     % > > --- Jeff Newton <newton at efn.org> wrote:
     % > > 
     % > > > Hey guys -
     % > > > 
     % > > > I have a friend of mine that would like to give
     % > me a
     % > > > Lemark 
     % > > > printer/copier to use with my computer, but he
     % > has
     % > > > software on a CD that 
     % > > > say's its for windows, I'm kinda wondering if
     % > this
     % > > > printer would be 
     % > > > compatible to use with Debian and Mozilla or
     % > not??
     % > > > 
     % > 
     % > 
     % > 
     % > 		
     % > __________________________________ 
     % > Do you Yahoo!? 
     % > Read only the mail you want - Yahoo! Mail SpamGuard.
     % > 
     % > http://promotions.yahoo.com/new_mail 
     % > _______________________________________________
     % > EUGLUG mailing list
     % > euglug at euglug.org
     % > http://www.euglug.org/mailman/listinfo/euglug
     % > 
     % 
     % 
     % 
     % 		
     % __________________________________ 
     % Do you Yahoo!? 
     % Yahoo! Mail - Helps protect you from nasty viruses. 
     % http://promotions.yahoo.com/new_mail
     % _______________________________________________
     % EUGLUG mailing list
     % euglug at euglug.org
     % http://www.euglug.org/mailman/listinfo/euglug
    
    -----
    John Sechrest          .         Helping people use
                            .           computers and the Internet
                              .            more effectively
                                 .                      
                                     .       Internet: sechrest at peak.org
                                          .   
                                                  . http://www.peak.org/~sechrest
    
  • [Eug-lug] euglug wiki



    John SechrestSat Jan 8 19:14:00 PST 2005

    Would the keepers of the EUG-LUG wiki be willing to check out LID?
    
    http://lid.meshnet.org
    
    
    It is a distributed ID... Can we merge this into the wiki code?
    
    
    
    Jacob Meuser <jakemsr at jakemsr.com> writes:
    
     % On Sat, Jan 08, 2005 at 03:46:50PM -0500, Timothy Bolz wrote:
     % > I just went to the euglug wiki and it's changed.   Is the wiki being used for 
     % > advertising chinese porn?  I don't know if anyone's been going to the site. 
     % > http://wiki.euglug.org/moin.cgi/
     % > I know I don't read chinese or japanese or korean.  Could someone check into 
     % > this and let us know.
     % 
     % this is common, Wiki-spam.
     % 
     % a Wiki I contribute to recently changed from open to password access
     % because of sometimes twice daily spammings.
     % 
     % -- 
     % <jakemsr at jakemsr.com>
     % _______________________________________________
     % EUGLUG mailing list
     % euglug at euglug.org
     % http://www.euglug.org/mailman/listinfo/euglug
    
    -----
    John Sechrest          .         Helping people use
                            .           computers and the Internet
                              .            more effectively
                                 .                      
                                     .       Internet: sechrest at peak.org
                                          .   
                                                  . http://www.peak.org/~sechrest
    
  • [Eug-lug] Question



    walter frySat Jan 8 19:13:34 PST 2005

    Ta   very funny..      :)
    
    _________________________________________________________________
    Express yourself instantly with MSN Messenger! Download today - it's FREE! 
    hthttp://messenger.msn.click-url.com/go/onm00200471ave/direct/01/