[arch-dev-public] [PATCH 4/4] Reduce code duplication in open() calls