Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-19-2004, 01:48 PM   #1
LQ Newbie
Registered: May 2004
Distribution: rh9
Posts: 1

Rep: Reputation: 0
Arrow generating uuids with uuid_gen ( libuuid )

i've been trying to generate uuids with the libuuid api. i've tried the following code many times and read through the man pages as many times.
i'm still getting the incorrect output format.

here's the code
#include <stdio.h>
#include <uuid/uuid.h>

int main(){
char string[37];
uuid_t gen;

uuid_unparse(gen, string);
printf("\n%08x-%04x-%04x-%04x-%012x", string);


*i get an output that resembles:


*when it should look like (this is what i got using uuidgen) :


i.e. the format is all messed up in the middle

am i missing something here??
please help me out !!

thanks a million

Last edited by jetley; 05-19-2004 at 01:58 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating PDF files ?? concoran Programming 6 09-25-2005 12:26 AM
Generating A Script gizza23 Linux - Software 7 07-24-2005 08:33 PM
Generating hash in perl ? MikeFoo1 Programming 3 05-21-2005 07:03 PM
update libuuid error Virgola Debian 2 05-12-2005 08:47 AM
Generating a CSR shaggz Linux - General 1 01-31-2003 12:56 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:12 AM.

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