Skip to content

Instantly share code, notes, and snippets.

View legionus's full-sized avatar

Alexey Gladkov legionus

  • Brno, Czech Republic
View GitHub Profile
diff --git a/src/libkfont/kdfontop.c b/src/libkfont/kdfontop.c
index 1eadbebb..cada3f95 100644
--- a/src/libkfont/kdfontop.c
+++ b/src/libkfont/kdfontop.c
@@ -21,11 +21,29 @@
#include "compat/linux-kd.h"
#endif
+static int
+is_kd_text(struct kfont_context *ctx, int fd)
$ ./setfont -h
Usage: setfont [option...] [newfont...]
Options:
-<N> load font "default8x<N>".
-o <FILE> write current font to <FILE>.
-O <FILE> write current font and unicode map to <FILE>.
-om <FILE> write current consolemap to <FILE>.
-ou <FILE> write current unicodemap to <FILE>.
-h<N> override font height.
diff --git a/arch/x86/coco/tdx/tdx.c b/arch/x86/coco/tdx/tdx.c
index 5b3421a89998..992cc3f19f52 100644
--- a/arch/x86/coco/tdx/tdx.c
+++ b/arch/x86/coco/tdx/tdx.c
@@ -494,16 +494,44 @@ static int decode_insn_struct(struct insn *insn, struct pt_regs *regs)
char buffer[MAX_INSN_SIZE];
if (user_mode(regs)) {
- int nr_copied = insn_fetch_from_user(regs, buffer);
+ int not_copied, nr_copied, size;
#!/bin/bash -efux
bridge=br0
netns=novpn
vether=veth0
read -r ether ether_uuid < <(
nmcli --fields type,device,uuid con show --active |
sed -n -e 's/^ethernet[[:space:]]\+//p' -e 's/[[:space:]]\+/ /'
)
TRACE in function: /opt/make-initrd/features/add-udev-rules/guess/common: main guess_feature: add-udev-rules
TRACE in function: /opt/make-initrd/features/cleanup/guess/common: main guess_feature: cleanup
TRACE in function: /opt/make-initrd/features/compress/guess/common: main guess_feature: compress
TRACE in function: guess/keyboard/action: main guess_modalias: input:b0003v25A7pFA23e0110-e0,1,4,11,14,k71,72,73,74,75,77,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,8C,8E,96,98,9E,9F,A1,A3,A4,A5,A6,AD,B0,B1,B2,B3,B4,B7,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,F0,ram4,l0,1,2,sfw
TRACE in function: guess/keyboard/action: main guess_modalias: hid:b0003g0001v000025A7p0000FA23
TRACE in function: guess/keyboard/action: main guess_modalias: usb:v25A7pFA23d0241dc00dsc00dp00ic03isc01ip01in00
TRACE in function: guess/keyboard/action: main guess_modalias: pci:v00001022d0000149Csv00001043sd000087C0bc0Csc03i30
TRACE in function: guess/keyboard/action: main guess_modalias: pci:v00001022d00001484sv00001043sd000087C0bc06sc04i0
#!/usr/bin/env python3
import ply.lex as lex
import ply.yacc as yacc
import logging
import pprint
logging.basicConfig(
def process_commands(payload):
fd = io.StringIO(initial_value=payload, newline='\n')
while True:
value = fd.readline()
if not value:
break
value = value[:-1]
#!/bin/bash -efu
# SPDX-License-Identifier: GPL-2.0-or-later
. shell-error
declare -A VARS=() LOCK=() GOTO=() LABEL=()
declare -A NAMES=( [KEY]=0 [ATTR]=1 [OPERATOR]=2 [VALUE]=3 )
declare -a RULE_FILES=()
rule_init_var()
  • Руками(?) в пакетах мы переносим всё из /bin, /sbin в соответстующие /usr/bin и /usr/sbin и создаём Provides со старым путём.
  • rpm должен сам создавать симлинк. Если есть Provides /bin/sh и файл /usr/bin/sh, то создаём ссылку /bin/sh -> ../usr/bin/sh.
  • После того как в /bin не останется ничего кроме ссылок на /usr/bin, в пакете filesystem можно менять /bin на симлинк.
  • Пока пакет filesystem не обновился, мы находимся на стадии постепенной подготовки, замещая файлы в /bin автоматическими ссылкам.
  • Чтобы filesystem заменить каталог на ссылку нам нужно удалить каталог в %pretrans. В этом случае конфликта не должно быть. From rpm handleRemovalConflict():
...but if the conflicting item is either not on disk, or has
already been changed to the new type, we should be ok afterall.
AAA_BBB = 123
BBB-CCC = 456
AAA1 = `echo $HOME`
_upper_ = A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
_lower_ = a b c d e f g h i j k l m n o p q r s t u v w x y z
_digits_ = 0 1 2 3 4 5 6 7 8 9
define remove-recursive
$(if $(1),$(call remove-recursive,$(wordlist 2,$(words $(1)),$(1)),$(subst $(firstword $(1)),,$(2))),$(2))