… | |
… | |
3516 | my $uuid = "$LOCALDIR/uuid"; |
3516 | my $uuid = "$LOCALDIR/uuid"; |
3517 | |
3517 | |
3518 | my $fh = aio_open "$uuid~", O_WRONLY | O_CREAT, 0644 |
3518 | my $fh = aio_open "$uuid~", O_WRONLY | O_CREAT, 0644 |
3519 | or return; |
3519 | or return; |
3520 | |
3520 | |
3521 | my $value = uuid_str $uuid_skip + uuid_seq uuid_cur; |
3521 | my $value = uuid_seq uuid_cur; |
|
|
3522 | |
|
|
3523 | if ($value < 1024) { |
|
|
3524 | warn "cowardly refusing to write low uuid value ($value)!\n"; |
|
|
3525 | return; |
|
|
3526 | } |
|
|
3527 | |
|
|
3528 | my $value = uuid_str $value + $uuid_skip; |
3522 | $uuid_skip = 0; |
3529 | $uuid_skip = 0; |
3523 | |
3530 | |
3524 | (aio_write $fh, 0, (length $value), $value, 0) <= 0 |
3531 | (aio_write $fh, 0, (length $value), $value, 0) <= 0 |
3525 | and return; |
3532 | and return; |
3526 | |
3533 | |