Skip to content

Instantly share code, notes, and snippets.

View kallisti5's full-sized avatar

Alexander von Gluck kallisti5

View GitHub Profile
kallisti5@eris fatr :) $ dd if=/dev/zero of=~/fat16.img bs=1M count=64
kallisti5@eris fatr :( $ mkfs.fat -F16 -n HAIKU ~/fat16.img
kallisti5@eris fatr :( $ ./target/debug/fatr ls ~/fat16.img
Volume HAIKU
Volume has 512 bytes per sector
0 File(s) 0 bytes
kallisti5@eris fatr :) $ dd if=/dev/zero of=~/fat16.img bs=1M count=64
kallisti5@eris fatr :( $ mkfs.fat -F16 -n HAIKU ~/fat16.img
kallisti5@eris fatr :( $ ./target/debug/fatr ls ~/fat16.img
Volume HAIKU
Volume has 512 bytes per sector
0 File(s) 0 bytes
From 95ce6c9f8dab95cb9ce994add4870038b405a121 Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Thu, 16 Nov 2017 08:00:48 -0600
Subject: [PATCH] libbsd: Move lutimes to bsd compat
* Rework be149e8ccf9 since lutimes isn't posix
---
headers/compatibility/bsd/sys/time.h | 32 +++++++++++++++++++++++++
headers/posix/sys/time.h | 1 -
src/libs/bsd/Jamfile | 1 +
use std::error;
use std::fmt;
use std::fmt::Debug;
#[derive(Clone)]
#[repr(C)]
pub struct RootEntry {
pub filename: [u8; 8],
pub extension: [u8; 3],
attrs: u8,
println!("({}) -> ({}) , ({}) -> ({})",
parts[0].to_uppercase().as_bytes().len(), self.filename.len(),
parts[1].to_uppercase().as_bytes().len(), self.extension.len());
self.filename.copy_from_slice(parts[0].to_uppercase().as_bytes());
self.extension.copy_from_slice(parts[1].to_uppercase().as_bytes());
// Output:
//
kallisti5@eris rune-image :) $ sudo ./target/debug/rune -b rpi2 /dev/sde
Creating bootable Raspberry Pi 2 (BCM2836) media.
No source image. Attempting to make target media bootable..
#0 Partition { p_status: 128, p_cyl_begin: 2, p_head_begin: 140, p_sect_begin: 1, p_type: 12, p_cyl_end: 9, p_head_end: 254, p_sect_end: 63, p_lba: 40950, p_size: 119700 }
Volume AHaiku
+ GET https://github.com/haiku/firmware/raw/master/arm/rpi2/README.md
Error: failed to fill whole buffer
src
├── bin
│   └── user_manager.rs
├── database.rs
├── main.rs
└── user.rs
/// Return used FAT root entries
pub fn root_entries_all(&self) -> Vec<RootEntry> {
self.root_dir
.chunks(BYTES_PER_ROOT_ENTRY)
.map(|chunk| {
let mut entry_bytes = [0; BYTES_PER_ROOT_ENTRY];
entry_bytes.clone_from_slice(chunk);
let entry: RootEntry;
unsafe { entry = mem::transmute(entry_bytes); }
Build completed unsuccessfully in 0:00:14
kallisti5@eris rust :( $ ls /home/kallisti5/Code/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-haiku/release/deps/core-8f1bc299e5081fcd*
/home/kallisti5/Code/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-haiku/release/deps/core-8f1bc299e5081fcd.0.bc
/home/kallisti5/Code/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-haiku/release/deps/core-8f1bc299e5081fcd.0.s
/home/kallisti5/Code/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-haiku/release/deps/core-8f1bc299e5081fcd.crate.metadata.o
/home/kallisti5/Code/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-haiku/release/deps/core-8f1bc299e5081fcd.d
kallisti5@nyx rune :) $ ./target/debug/rune -b rpi2 -i ~/Code/haiku/generated.arm/haiku-arm.mmc /tmp/haiku-arm-rpi2.mmc
Partition 0:
status: 128
CHS begin: 140 1 2
type: 12
CHS end: 254 63 9
lba: 4137615360
size: 2496856320
Partition 1:
status: 0