diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-02-18 17:41:24 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-02-18 17:41:24 +0000 |
commit | 26bb069c535e3fd5b0e0fb28fb54a2a540b60a84 (patch) | |
tree | 9eab7637e5fa1d881c775a6f0611b74e385196f1 /src/uuid.cpp | |
parent | 80c8dd155a164c186fd11e3e3f66e8f3cfdf19fe (diff) | |
download | libbu++-26bb069c535e3fd5b0e0fb28fb54a2a540b60a84.tar.gz libbu++-26bb069c535e3fd5b0e0fb28fb54a2a540b60a84.tar.bz2 libbu++-26bb069c535e3fd5b0e0fb28fb54a2a540b60a84.tar.xz libbu++-26bb069c535e3fd5b0e0fb28fb54a2a540b60a84.zip |
Some Uuid tweaks, not much, just figuring out the format. MyriadFs is coming
along quite nicely. It looks like it works great for normal programs, but there
need to be some tweaks made to a few things before it's working 100% via fuse.
Also, the fuse module won't let you specify a file, a little odd.
Diffstat (limited to '')
-rw-r--r-- | src/uuid.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/uuid.cpp b/src/uuid.cpp index 69af5b4..d34a989 100644 --- a/src/uuid.cpp +++ b/src/uuid.cpp | |||
@@ -45,6 +45,16 @@ Bu::String Bu::Uuid::toString() | |||
45 | return mb.getString(); | 45 | return mb.getString(); |
46 | } | 46 | } |
47 | 47 | ||
48 | Bu::String Bu::Uuid::toUrn() | ||
49 | { | ||
50 | return "urn:uuid:" + toString(); | ||
51 | } | ||
52 | |||
53 | int Bu::Uuid::getVersion() | ||
54 | { | ||
55 | return (data[6]&((8|4|2|1)<<4))>>4; | ||
56 | } | ||
57 | |||
48 | #define msb( i ) (1<<(7-i)) | 58 | #define msb( i ) (1<<(7-i)) |
49 | 59 | ||
50 | void Bu::Uuid::clear() | 60 | void Bu::Uuid::clear() |